Commit Graph

222 Commits

Author SHA1 Message Date
frytimo 0a42d8f198 Add caching to the auto_loader for interfaces (#7320)
* update auto loader to load and cache interfaces

* use new method to update the auto loader cache

* use new interface

* use new interface to trigger a cache flush

* update the console upgrade menu

* update the missing implements syntax

* add the clear_cache to the flush cache button
2025-03-15 09:13:36 -06:00
FusionPBX 7897ff5b9e Clear the cache 2025-03-12 14:42:50 -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 b85eaaac73 Upgrade - Source: Move Preview styles to theme CSS file, style after modal. 2025-02-21 08:51:52 -07:00
frytimo 5e6ec475df update auto_loader cache file when updating (#7255) 2025-02-15 10:44:46 -07:00
frytimo 0931197137 build array in auto_loader constructor (#7158)
* Build an array in the auto_loader constructor

* Update auto_loader.php

* Update auto_loader.php

* minor adjustment to name and comment and remove trailing closing tag

* use best practices for the loader method
Allowing the loader method:
- Should Never Be Called Manually
- Prevents External Modification
- Hides Implementation Details

* cache array in the temp folder and load if available

* re-organize functions within the class

* add cache recreation for auto_loader in upgrade_menu

* add cache recreation for auto_loader in upgrade_menu

* Update app_languages.php
2025-02-13 14:48:40 -07:00
frytimo 3144036ae0 add new menu upgrade option to reset file permissions (#7232)
* add new menu upgrade option to reset file permissions
2025-01-28 16:20:43 -07:00
fusionate bf7526f0ef Multiple Apps: Integrate content cards. 2024-09-04 17:51:23 -06:00
MarBifrost 906b3edf03 Corrections in Georgian translation (#7113) 2024-08-31 10:02:51 -06:00
FusionPBX e0ed81a5ba Re-use the Database connection 2024-08-29 03:35:38 -06:00
NorwayFun aabc2f33a8 Localization: Add full support for Georgian language (#7110)
* Translating apps to Georgian

* Translating apps to Georgian

* Translating more apps to Georgian

* Translating more apps to Georgian

* Translating more apps to Georgian

* Translating more apps to Georgian

* Translating more apps to Georgian

* Translating theme to Georgian

* Translating core to Georgian

* Translating core to Georgian

* Translating core to Georgian by Marie

* Translating core to Georgian

* Translating resources to Georgian by Marie

* Translating core to Georgian

* fix app_languages.php
2024-08-28 09:59:02 -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
markjcrane 22ba339505 Allow one line feed at the end of the file 2024-08-05 18:27:59 -06:00
FusionPBX cd1cc70044 Remove redundant database objects
This reduces database connections and improves performance.
2024-08-05 14:22:17 -06:00
jrmcclean 1d4f366b05 Update upgrade.php (#6863)
Added Paths for Windows as well new variable for $cache_location and $php_dir to accommodate windows values.
2024-07-23 08:12:44 -06:00
Anthony b7ddbd533c Added/Adjusted translations in core app_languages.php files (#7001)
* Added/Adjusted translations in user_logs/app_languages.php

* Added/Adjusted translations in core/upgrade

* Added/Adjusted translations in core/notifications
2024-06-08 09:56:06 -06:00
frytimo c176192c13 move dollar sign to inside the curly brace (#6991) 2024-06-03 13:32:19 -06:00
fusionate 2d3dca985d Upgrade - CLI (Manual & Menu): Mitigate PHP 8.x warnings, minor adjustments. 2024-05-13 14:19:34 -06:00
fusionate b369fad190 Upgrade - Menu & Permission Defaults: Mitigate PHP 8.x warnings. 2024-05-13 12:49:29 -06:00
fusionate 8ca960b127 Upgrade - Source: Mitigate PHP 8.x warning. 2024-05-13 12:22:01 -06:00
fusionate 7c816a1e36 Upgrade: Populate missing translations. 2024-05-03 18:34:29 -06:00
fusionate 006409bdd9 Upgrade - Source Code: Additional minor adjustments. 2024-05-03 18:18:05 -06:00
fusionate 7ec902add2 Upgrade - Source Code: Preview link to view list of changed files before upgrading. 2024-05-03 17:32:17 -06:00
FusionPBX 8a30f04125 Update upgrade.php changes apps to repos 2024-04-27 10:52:22 -06:00
frytimo c85e10ea09 include software_name in the global declaration (#6957) 2024-04-23 10:23:04 -06:00
frytimo 33ff85ee75 Commad line upgrade enhancements (#6955)
* Add new English language phrases for cli upgrade menu

* include a software name as a const for cli upgrade menu

* add it repos in app folder, internationalizations, and descriptions

* bug fix when response_source_update is empty change back to origin dir

* change original 'menu' to 'menus'. Allow calling menu from upgrade.php

* Update upgrade_menu.php
2024-04-22 17:15:09 -06:00
frytimo c4fd1c4842 Rename domains to app defaults in menu (#6954)
* rename 'Domains' to 'App Defaults' in menu options for clarity

* reorder app defaults to be after the schema like web interface
2024-04-22 12:56:31 -06:00
fusionate 7b6bdb6fb1 Upgrade - Source Code: Minor adjustments to interface. 2024-04-18 11:51:13 -06:00
FusionPBX cffe54a136 Update app_languages.php 2024-04-17 21:04:28 -06:00
FusionPBX e607253bc6 Update layout for source and other repos 2024-04-17 20:58:47 -06:00
frytimo 37fd4692c1 Add command line menu for upgrade (#6949)
* use existing git_pull function from global functions
2024-04-17 15:04:34 -06:00
fusionate 360cc3cdd3 Upgrade: Rework Source Code option to be more flexible. 2024-04-15 19:17:09 -06:00
fusionate c3f20602e7 Upgrade: Minor layout adjustments. 2023-12-22 00:23:29 +00:00
fusionate f6700881b2 Upgrade - Source Code: Offer optional apps source update. 2023-12-22 00:05:55 +00:00
demonspork df6d56d148 Support updating optional installed apps via git (#6513)
* WIP: Support updating optional installed apps via git

* support app source update via cli

* Update app_languages.php

* Update index.php

* Refactor App Git updating

Refactor Optional App Git updating for more resilience and better handling of ssh remotes and to only update each repository once.

* git app updates fix gui updates for repo based updating
2023-12-21 12:28:04 -07:00
Anthony 84f487cba8 Added Greek translations for fusionpbx/core. (#6809)
* Added Greek translations to  domain_settings/app_languages.php

* Added Greek translations for domains/app_languages.php

* Added Greek translations for groups/app_languages.php

* Added Greek translations for menu/app_languages.php

* Added Greek translation for upgrade/app_languages.php

* Added Greek & Great Britain translations for user_logs/app_languages.php

* Added Greek translations for user_settings/app_languages.php

* Added Greek translations for users/app_languages.php
2023-10-06 13:46:03 -06:00
Alex 5825e58451 Fixed translations (#6794)
* Update app_menu.php

* Update app_menu.php

* Update app_menu.php

* Update app_menu.php

* Update app_menu.php

* Update app_menu.php

* Update app_menu.php

* Update app_menu.php

* Update app_languages.php
2023-08-30 14:52:32 -06:00
markjcrane 38150d25aa Use require.php 2023-06-17 21:50:29 -06:00
markjcrane 32051873be Use __dir__ to find resources/require.php 2023-06-16 22:49:09 -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 bb9f48296a PHP 8.2 Deprecated dynamic properties. 2023-06-12 20:59:56 -06:00
fusionate f8a3d95e83 Upgrade [CLI]: Fix minor language file issue. 2023-05-18 20:25:18 +00:00
fusionate c3018b6ae2 Upgrade (CLI): Update for PHP 8.1 2023-05-17 20:43:17 +00:00
fusionate 4bac37850a Upgrade (GUI): Updates for PHP 8.1 2023-05-17 20:37:17 +00:00
markjcrane 6d7e125743 Fix all PHP 8.1 messages for upgrade.php 2023-05-17 10:07:49 -06:00
Anthony beac6eedeb Update app_languages.php (#6689)
* Update app_languages.php
2023-05-11 16:14:05 -06:00
Ben f28fa76890 added traslation for ro-ro and a few minor corrections (#6684) 2023-05-09 14:47:12 -06:00
FusionPBX 43d33fb121 Remove smarty php cache 2023-05-09 09:13:40 -06:00
fusionate 28e6cb9b48 Upgrade: Fix PHP 8.x issue on str_replace function in app_defaults.php. 2023-05-08 13:24:29 +00:00
frytimo a258a067a5 restore any missing default groups when permissions are restored (#6657) 2023-05-03 11:35:59 -06:00