Commit Graph

76 Commits

Author SHA1 Message Date
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
FusionPBX cd8d5302ac
Fix temporary permissions 2024-11-29 13:57:01 -07:00
fusionate ac94e22a1d
Fax Server: Pull in language file for email template replacements. 2024-08-22 17:20:36 -06:00
fusionate 12eead4b4d
Fax Server: Add option for Download Link on received fax notifications, instead of attachment. 2024-08-22 16:11:06 -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
FusionPBX 6600bbdfc6
Update the indentation 2024-08-14 13:03:03 -06:00
frytimo 301fb2b974
remove all $_SESSION references and use single database object (#7095)
Updates:
- use config object to find and load config file
- use single database object with config passed in constructor
- use settings object with database passed in constructor
- parse command line options with for loop so order no longer matters
- store all passed options in the super global $_REQUEST array for easy reference and debugging
- add debug and debug_level options for command line
- allow dumping the command line arguments when debug_level is 3 or higher
- add config option in command line to set location of config file
- add a shutdown function to allow for the exit command to be used but still output to either console or file
- add extra checks for options that are needed during runtime
- remove old PHP version 4 code
- add is_file check when checking for a valid .tiff file because file_exists returns true if it's a directory or file
2024-08-14 12:59:53 -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
markjcrane f506b00b57 PHP 8.2 Deprecated dynamic properties 2023-06-12 21:27:23 -06:00
Alex 5e90483b95
Missing quotes (#6751) 2023-06-09 16:59:09 -06:00
markjcrane 6cbf572512 Remove fax_retry.lua supporting FAX Queue only 2023-05-17 12:37:31 -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 07679fe80d
Add escapeshellarg to the variables used in the command line. 2022-06-29 10:38:36 -06:00
FusionPBX 58fc71fce9
Fix implode paramater order and few other minor edits. 2022-05-13 11:44:41 -06:00
FusionPBX 0e4e379b14
Use fax_email from the fax table for the mail to address.
And add additional condition for fax_queue enabled.
2022-04-30 23:50:50 -06:00
FusionPBX eeba3eb66f
Fix fax forward so it can use the fax queue. 2022-04-30 20:39:15 -06:00
FusionPBX a84095ef30
Fix the email from address. 2022-04-23 15:27:29 -06:00
FusionPBX 72cfc0d418
Remove fax enqueue as it has been replaced by the new fax queue. 2022-04-19 00:53:07 -06:00
FusionPBX 4f5b832157
Use the email class object. 2022-04-18 12:13:43 -06:00
FusionPBX f71e6563e7
Update fax_to_email.php 2022-04-02 23:04:23 -06:00
FusionPBX 249d40381a
Add the file extension to the name. 2022-02-07 15:44:54 -07:00
FusionPBX 4c4fef83c8
Update fax_to_email.php 2022-02-07 15:28:40 -07:00
FusionPBX a94009b5a9
Attach the PDF file if it exists. 2022-02-07 15:24:38 -07:00
FusionPBX 40205d32bf
Update fax_to_email.php 2022-02-04 21:53:06 -07:00
FusionPBX 737eb1df0a
Use the right variable fax_email. 2022-02-04 21:32:49 -07:00
FusionPBX 4f6e5da0af
Use the send_email function to send fax to email. 2022-02-04 16:01:27 -07:00
FusionPBX 2a90732936
Remove the timezone from now() 2021-11-20 11:48:22 -07:00
root 45319ef301 Set directories to 755 and files to 644 2019-12-14 17:34:17 +00:00
Nate faadda843e Update fax_to_email.php 2019-09-09 12:48:36 -06:00
Nate 04c2f7a132 Misc: Database class integration. 2019-08-28 17:53:34 -06:00
FusionPBX f2481537a7 Update fax_to_email.php 2018-02-15 18:49:14 -07:00
FusionPBX b5b2032ecc Update fax_to_email.php 2018-02-06 18:23:09 -07:00
FusionPBX f2edcf0fe0 Update fax_to_email.php 2018-02-02 00:51:59 -07:00
FusionPBX 1b3a824978 Update fax_to_email.php
Make the code more consistent with the rest of the project.
2018-02-02 00:06:11 -07:00
ewyand 9a75dc9401 Add customization for email (#2968)
Add customization for email
Add customization for smtp_from and smtp_from_name for voicemail to email
Add customization for smtp_from and smtp_from_name for fax to email
Fixed typo
2018-02-01 22:21:04 -07:00
Mafoo 20e98628fa Added missing execute rights (#2459) 2017-03-29 21:40:54 -06:00
FusionPBX 774f6f6558 Update fax_to_email.php 2017-03-01 12:16:11 -07:00
FusionPBX 02b5fb71d6 Update fax_to_email.php
Remove the hard coded fax_enable_t38=true,fax_enable_t38_request=true in favor of default settings -> fax -> variables.
2016-12-02 21:16:07 -07:00
Alexey Melnichuk 9d592f3318 Fix. Set correct dial-string in fax_to_email (#2223) 2016-12-02 02:08:43 -07:00
FusionPBX 3356c5857b Update fax_to_email.php
Add the common_dial_string to the dial_string.
2016-12-02 00:27:00 -07:00
Len 01c1520f25 Update fax_to_email.php
update old variable $t38 to $fax_variables
2016-11-30 01:38:00 -05:00
FusionPBX b5a9d25fae Update fax_to_email.php 2016-10-31 14:39:04 -06:00
jebsolutions 031b1053dc Fax email fix for master branch (#2023)
* allow bypass of certificate validation

* Update app_defaults.php

change to match

* Update app_defaults.php
2016-10-31 14:19:41 -06:00
FusionPBX a8efb3b419 Update fax_to_email.php 2016-10-31 07:37:32 -06:00
FusionPBX 472c7efb3b Update fax_to_email.php
Fix fax to email when using method and smtp_port.
2016-09-28 13:30:46 -06:00
pquan e408cc33bf fix tiff2pdf conversion in short faxes (#1596) 2016-07-27 23:00:33 -06:00
markjcrane 51ea37ed18 Rename the EventSocket class. 2016-04-02 19:23:16 -06:00
mafoo 2119c7ee8d WhitespaceClean-others
whitespace pass over files
for reference regex that was used s/[ \t]+(\r?\n)/\1/
2016-03-11 13:58:35 +00:00
Alexey Melnichuk 5339e39db8 Add. Send reply message after fax task done. 2015-11-30 11:57:09 +03:00