Commit Graph

23 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
FusionPBX
cdc8a8842c Call Block Update
- unify the process for preparing the call_block_number
- move the query for user_extensions outside and before the loop
- database used more efficiently
2024-07-26 14:33:50 -06:00
FusionPBX
16c6d8d58b Fix call block for regular non admin users 2024-07-25 20:49:56 -06:00
FusionPBX
fa16c8ad7c Update call_block.php
- Improve the database handling
- Get the country code from the destinations table
2024-07-25 13:24:40 -06:00
FusionPBX
8beecfbb89 - Update call block permissions
The call_block_all permission was pulling double duty. 
- Changed the code to use call_block_all only for SHOW ALL to call block across all domains.
- Permission call_block_extension will be used instead for the purpose of showing the extension list. 
- If someone doesn't call_block_permission then their assigned extensions will be use with each call block item they add.
2024-07-18 17:13:22 -06:00
fusionate
291c03fc75 Call Block - Delete: Update class to allow delete of Global call blocks, if call_block_domain permission exists. 2023-10-17 22:35:29 +00:00
fusionate
b4855290de Call Block: Updates for PHP 8.1 2023-06-01 23:22:59 +00:00
frytimo
69bd42af05 remove unneeded destruct methods as GC has higher performance (#6631)
Co-authored-by: Tim Fry <tim@voipstratus.com>
2023-04-27 20:18:53 -06:00
FusionPBX
751596cd89 Use CDR list add call block caller ID number 2023-04-03 13:17:42 -06:00
Jesse Gruver
56b53b5f2c Remove the country code if not e.164 (#6367) 2022-05-09 16:40:44 -06:00
FusionPBX
0fd70808bc Add the country code for call block 2022-02-24 17:55:46 -07:00
fusionate
832b3fae22 Call Block: Outbound call support. 2020-11-17 17:39:49 -07:00
Nate
f748a754ad Call Block: UI Adjustments for Country Code. 2020-11-02 10:55:31 -07:00
Nate
d5bc65111a Call Block: Partial support for Country Code. 2020-10-27 11:21:12 -06:00
Nate
306606f7c6 Call Block: Action bar, list view and button updates, bulk add (with class) from CDR, etc. 2020-01-11 19:06:34 -07:00
Nate
09f8287138 Call Block: Update class. 2019-11-30 20:51:33 -07:00
Nate
bec5c647c9 List View: Updates to action classes. 2019-11-30 15:18:48 -07:00
Nate
243b6b4e8c Access Controls, Bridges, Call Block, Call Flows: Class toggle method adjustments. 2019-10-29 10:11:18 -06:00
Nate
0c584db194 Minor mods to Access Controls, Bridges, Call Block and Call Broadcast lists and classes. 2019-10-25 19:40:28 -06:00
Nate
22ec9cd469 Update Access Controls, Bridges, Call Block, Call Broadcast classes. 2019-10-21 17:13:21 -06:00
Nate
17ac712cc8 Updates to Access Controls, Bridges, and Call Block. 2019-10-21 17:03:59 -06:00
Nate
e29c4df126 Call Block: List view updates. 2019-10-19 19:14:34 -06:00