48 Commits

Author SHA1 Message Date
frytimo
adfc4cc469 Create more documentation (#7627)
* Documentation, format class, no modification.
2025-11-18 18:33:07 -07:00
FusionPBX
76e2e7d3b7 Remove database app_name and app_uuid (#7562)
- Remove database app_name, app_uuid
  - This is handled automatically by the database class
- Remove redundant database::new()
2025-10-09 17:54:05 -06:00
Alex
1e96df6e95 Change $setting to $settings (#7318)
* Change $setting to $settings

* Update app_defaults.php

* Update fax_queue.php

* Update xml_cdr.php

* Update email_queue.php

* Update transcribe.php

* Update send.php

* Update fax_queue.php

* Update fax_send.php

* Update app_defaults.php

* Update email_queue.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php
2025-03-14 16:19:49 -06:00
frytimo
08001488f4 Allow namespace in auto loader (#7307)
* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove closing tag

* remove invalid method params

* remove closing tag

* remove closing tag

* Update auto_loader to load each class file in the project
Update the auto_loader class to use an include statement on each file in the project to load the class within the file. This will allow mismatched names within the file to be loaded and mapped according to the declaration instead of the filename. The class is then checked against the parsed classes from the PHP engine so that namespaces are available and mapped to the file they were declared in. An update was also made to the search algorithm used to find a file that was not already loaded by collapsing the array to have only valid matches to increase performance on a cache miss. Logging within the auto_loader has been moved to a function.
Multiple files were modified to allow the include statement. When the class has the `if(class_exists())` statement, the auto_loader is called to check for the class. This caused an infinite loop scenario so all wrappers have been removed. The auto_loader will now break the loop by directly modifying the internal classes array instead of trying to restart with the 'reload_classes' method.

- APCu is used to cache classes so any loading of the classes is done only once. To clear the APCu cache, restart php-fpm or call the auto_loader::clear_cache() function.
- Cache file is used when APCu is not available. To clear the cache remove it from the tmp folder or call the auto_loader::clear_cache() function.
- All classes must no longer have a class_exists wrapper to benefit from the performance boost.
- Classes should not be directly included when the auto_loader is used.

* remove include statement of class file

* Update destinations.php
2025-03-12 13:55:47 -06:00
fusionate
15cad2369c Fax Server - Fax to Email: Fix population of cover page labels. 2024-11-14 13:21:14 -07:00
frytimo
773ecc96cc pass database object to settings object (#7178)
Use the singleton database object with database::new syntax
Pass the connected database object to the settings object so settings object does not have to create another connection
2024-11-09 18:29:22 -07:00
FusionPBX
6d7b3a9249 Update fax_emails.php
Add additional logging information
2024-09-09 21:06:30 -06:00
FusionPBX
c5be2b27e9 Update fax_emails.php
- Get the domain name more efficiently
- Add the domain name to the output
2024-09-09 20:38:26 -06:00
Alex
cb6edd88ef Added content card to applications (#7121) 2024-09-05 17:10:04 -06:00
frytimo
2cbb4dbc31 remove instances where a pointer is used in a foreach loop for value (#7108) 2024-08-22 12:41:10 -06:00
frytimo
46b7c5536a Prevent deleting the email when fax sender is not authorized (#6981)
* Prevent deleting the email when fax sender is not authorized
2024-05-21 22:51:50 -06:00
Antonio Fernandez
68b4b32519 Fix issue with some emails not getting pulled from IMAP (#6969)
* Fix issue with some emails not getting pulled from IMAP

* alert users of the ability to enter a domain name
2024-05-04 23:07:23 -06:00
fusionate
8bd5bc04dd Fax: Remove deprecated fax_send_greeting elements. 2023-11-07 15:40:34 +00:00
FusionPBX
905d175e59 Use settings class for fax send 2023-09-16 02:02:38 -06:00
fusionate
17af8976d9 Fax Emails: Fix minor syntax issue. 2023-06-30 18:51:25 +00:00
FusionPBX
4644cf6e15 Update fax_emails.php 2023-06-28 10:21:00 -06:00
frytimo
d7bbcd89f5 Use magic constant dir (#6711)
* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__ to load only functions.php

* replace spaces with tab character

* update dirname command to use levels instead of nesting

* use magic constant __DIR__

* update dirname command to use levels instead of nesting

* Update access_control_edit.php

* Update access_control_import.php

* Update access_controls.php

* Update dnd.php

* Update access_controls_reload.php

* Update call_center_agents.php

* Update call_center_agents.php

* Update fax_queue.php

* Update login.php

* Update pdo.php

* Update pdo_vm.php

* Update switch.php

* Update index.php

* Update css.php

* Update v_mailto.php

* Update fax_to_email.php

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-06-15 11:28:23 -06:00
frytimo
fef8165be2 Frytimo pr patches for php8.1 (#6630)
* Passing null to parameter #2 ($string) of type string is deprecated

* Passing null to parameter #1 ($string) of type string is deprecated

* php 8.1 fixes

* php 8.1 fixes - replace strlen($var) > 0 with !empty($var)

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - strlower with null

* php 8.1 fixes - strreplace with null

* php 8.1 fixes - passing null to base64_decode

* php 8.1 fixes - check for false and check for null on $this->dir

* php 8.1 fixes - remove assignment of $db variable to modules object

* php 8.1 fixes - avoid sending null to substr

* php 8.1 fixes - change ${var} to {$var}

* php 8.1 fixes - check for null before preg_replace

* php 8.1 fixes - remove setting db variable on domains object

* php 8.1 fixes - set empty string if $row['domain_setting_subcategory'] is null

* php 8.1 fixes - set empty string if $_REQUEST['show'] is not available

* php 8.1 fixes

* php 8.1 fixes - correct $_POST checking syntax

* php 8.1 fixes - correct $_POST variables

* php 8.1 fixes

* Use brackets consistently

* Update user_setting_edit.php

* Change to not empty

* Update device.php

* Update text.php

---------

Co-authored-by: Tim Fry <tim@voipstratus.com>
Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-05-05 10:46:37 -06:00
markjcrane
d50bcb476a Replace root.php 2022-10-10 16:35:14 -06:00
FusionPBX
1fc99311a5 Update fax_emails.php
Added spaces to the code to be more consistent.
2022-04-17 14:21:54 -06:00
FusionPBX
652d135452 Setting fax_send_mode not used so removing it. 2022-04-16 11:20:28 -06:00
FusionPBX
71be6af0c2 Update fax_emails.php 2022-04-01 17:25:57 -06:00
FusionPBX
a0cb6ec4fd Lines that were commented out failed with Dovecot IMAP
Changed the code to work around the issue we had with Dovecot on PHP 7.3
2022-03-31 19:22:27 -06:00
frytimo
e9288230b8 Honor toll_allow when using email-to-fax (#6128)
toll_allow should be honored for outbound routes
2021-11-22 09:09:03 -07:00
fusionate
0dc478ac00 Fax Server: Add ability to authorize domains for Email-to-Fax. 2020-12-02 12:20:10 -07:00
frytimo
79daf8feaa Match mixed case in "from" address (#4618)
RFC's do not specify addresses must be converted lower case by email servers. If a sender has set their "from" address set to a mixed case string, the fax send will not match the authorized senders. This corrects that by changing authorized senders list to lower case before the comparison is done.
2019-09-17 12:39:31 -06:00
frytimo
8068a89a3a Update fax_emails.php (#4529)
Change $array to $result
2019-09-09 19:10:22 -06:00
frytimo
907c1e0867 Update fax_emails.php
Add missing ';'
2019-08-30 16:32:48 -04:00
Nate
d23c5d84c4 Fax Server: Database class integration. 2019-08-07 18:59:26 -06:00
ednt
4e558f7c3d convert local html characters like &Uuml; (#4069)
Foreign language html emails were sent as received.
Now all html entities should be converted to there corresponding UTF8 characters.
2019-05-07 11:29:50 -06:00
FusionPBX
16ee86e4ef Update fax_emails.php 2018-02-25 02:04:28 -07:00
Chris Black
0d24ad70e7 fix fax multiple files. (#1963)
Added some changes from ICR regarding the text/plain emails, added a
uuid to the file name when getting saved to the FS in the event that
multiple emails come in with the same exact file name and also reset
the tif_files in fax_send as it was just adding to the end of the array
and creating bad tiffcp commands.
2016-09-30 15:47:22 -06:00
Harry G. Coin
bda6861f88 \r\n --> \n
Cause all the .php files containing lines ending with \r\n to instead end with \n.

DYI with:

find fusionpbx -type f -name '*.php' -exec dos2unix '{}' \;
2016-04-25 20:30:23 -05:00
Alexey Melnichuk
85454fbc9c Add. allowed_extension array to specify allowed files in email. 2016-04-14 17:38:33 +03:00
Alexey Melnichuk
eb1a13fc23 Change. parse_message do full parse test and attachments.
Change. use only `text/plain` part to build front page.
Change. use only `attachment` but not `inline` files to build fax file.
2016-04-08 12:31:13 +03:00
Alexey Melnichuk
c9ba145f1d Fix. get text part of email message with single part email. 2016-04-07 13:11:24 +03:00
Alexey Melnichuk
64f91c3ed2 Fix. Poll several mail at once.
Problem causes by fax_send.php which change current dir and second call can not finding libraries.
2015-11-20 15:22:09 +03:00
Alexey Melnichuk
2f88d1d985 Fix. Decode email message from quoted-printable/base64.
Fix. Allow set custom fonts to support non latin alphabet.
2015-11-20 14:45:06 +03:00
Alexey Melnichuk
2aff851929 Fix. fax_emails.php relay on number cleanup in fax_send.php 2015-11-19 14:48:41 +03:00
Alexey Melnichuk
aaa333eda1 Fix. Use fax_send_mode option in fax_send.php file. 2015-11-19 13:13:47 +03:00
Alexey Melnichuk
17f435fb22 Add. Web UI to configure fax_queue. 2015-11-18 15:37:41 +03:00
Alexey Melnichuk
4fde7dfc80 Fix. multiple calls fax_send caused error.
Fix. require EventSocket implicitly.
Fix. require `test` class.
2015-11-12 14:00:01 +03:00
Mark Crane
4699d4c8e8 Synchronize the translations. 2015-06-06 02:37:26 +00:00
Mark Crane
91a12aa8ed Add imap_errors() the fax/fax_emails.php to make it possible to see IMAP connection problems. 2015-06-01 22:44:28 +00:00
Nate Jones
ff19e9c87e Fax Server: Mods to email2fax feature to prevent unnecessary/undesired cover page from being generated. 2015-03-25 17:52:45 +00:00
Nate Jones
2448ab3a8e Use the new multi-lingual code on misc files. 2015-01-18 10:33:34 +00:00
Mark Crane
c5755666cb Add the text class to more of the applications. 2015-01-18 10:06:08 +00:00
Nate Jones
ef7e744f03 Fax Server: Added email-to-fax functionality. 2014-12-03 11:03:52 +00:00