22 Commits

Author SHA1 Message Date
FusionPBX
6b063f2c28 Replace the DOCUMENT_ROOT and PROJECT_ROOT variables
Use the __DIR__ constant and dirname as needed
2025-12-08 14:12:19 -07:00
markjcrane
ffa86100b2 In the service reconnect to the database only when needed 2025-11-15 08:29:51 -07: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
FusionPBX
5c9c872c99 Show newest emails first 2025-01-01 11:26:44 -07:00
FusionPBX
6f1c595b1f Use the PHP_BINARY constant 2024-12-02 17:54:49 -07:00
FusionPBX
8a2688cfc5 Update email_queue.php 2023-12-11 11:48:58 -07:00
FusionPBX
5afce93f03 Update email_queue to use settings class 2023-09-14 16:10:13 -06:00
FusionPBX
1880688813 Use settings class needed for the email_queue 2023-09-13 09:54:00 -06:00
fusionate
d4d5799342 Email Queue - Job & Service: Fix variable issues to mitigate errors. 2023-08-01 00:14:00 +00:00
markjcrane
32051873be Use __dir__ to find resources/require.php 2023-06-16 22:49:09 -06:00
FusionPBX
e1b0f08321 Update the config.conf include 2023-01-13 13:58:06 -07:00
FusionPBX
b300961d75 Use server DOCUMENT_ROOT variable. 2022-10-11 11:45:37 -06:00
FusionPBX
f75f623767 Remove root.php and include require.php once 2022-10-11 11:27:57 -06:00
markjcrane
d50bcb476a Replace root.php 2022-10-10 16:35:14 -06:00
FusionPBX
6f6eb88ebb Use single quotes for the function_exists parameter. 2022-09-12 20:50:13 -06:00
FusionPBX
52b06b5afc Use /proc/$pid if posix_getsid is undefined 2022-08-30 14:45:09 -06:00
FusionPBX
29d1221346 On CentOS posix_getsid function may not be available. 2022-08-30 14:20:40 -06:00
FusionPBX
326544a006 Get the hostname of the server before the loop. 2022-08-16 18:45:48 -06:00
FusionPBX
c48e61124d Update email_queue.php 2022-04-24 00:19:38 -06:00
FusionPBX
7a4b79a54e Make the path more dynamic for the email queue service 2022-04-23 18:21:37 -06:00
markjcrane
133c51bfcf Add the email_queue. 2022-04-22 13:00:38 -06:00