Commit Graph

128 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
c812dfb58b Music On Hold: Remove unused parameters from the recording_seek() function call. 2024-10-18 19:07:19 -06:00
anthony-ricci
7122ecc154 Recording Seek (#7163) 2024-10-18 18:45:21 -06:00
Alex
cb6edd88ef Added content card to applications (#7121) 2024-09-05 17:10:04 -06:00
fusionate
f55fbabb87 Music on Hold: Audio waveform generation integration. 2024-02-09 13:11:14 -07: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
fusionate
1e391aad4f MOH: Updates for PHP 8.1 2023-06-08 18:03:37 +00:00
fusionate
2a2a705f6a MOH: Minor visual adjustment to upload form. 2023-06-08 17:44:04 +00:00
Anthony
9c650a29b1 Fixed Errors for Phrases, Recordings, Operator Panel and Music on Hold. (#6735) 2023-06-01 15:21:29 -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
4cf53c9719 Work around for FreeSWITCH bug where .loc break Music on Hold.
Fixed in the following commit.
https://github.com/signalwire/freeswitch/pull/1577

The commit was accepted. Hoping the bug fix is included in the next release of FreeSWITCH 1.10.8. However we need a work around for those using older versions and 1.10.8 hasn't been released yet.
2022-07-19 12:02:54 -06:00
AlexC
e316559771 Added show all button (#6249)
* Update call_center_queues.php

* Update call_center_agents.php

* Update app_config.php

* Update app_config.php

* Update contacts.php

* Update app_config.php

* Update ivr_menus.php

* Update app_config.php

* Update call_flows.php

* Update app_config.php

* Update conference_centers.php

* Update app_config.php

* Update voicemails.php

* Update app_config.php

* Update phrases.php

* Update app_config.php

* Update recordings.php

* Update app_config.php

* Update call_recordings.php

* Update app_config.php

* Update call_broadcast.php

* Update app_config.php

* Update time_conditions.php

* Update app_config.php

* Update music_on_hold.php

* Update app_config.php

* Update conferences.php
2022-01-20 15:54:42 -07:00
AlexC
2a74114cf2 Copy, toggle and delete buttons visible when checkbox is selected (#6242)
* Update bridges.php

* Update call_block.php

* Update call_center_queues.php

* Update call_center_agents.php

* Update call_broadcast.php

* Update call_flows.php

* Update call_recordings.php

* Update conference_centers.php

* Update conference_rooms.php

* Update conference_controls.php

* Update conference_profiles.php

* Update conferences.php

* Update contacts.php

* Update fax.php

* Update ivr_menus.php

* Update music_on_hold.php

* Update phrases.php

* Update recordings.php

* Update streams.php

* Update voicemails.php

* Update devices.php

* Update device_vendors.php

* Update device_vendor_functions.php

* Update extensions.php

* Update gateways.php

* Update dialplans.php

* Update destinations.php

* Update email_templates.php

* Update modules.php

* Update sip_profiles.php

* Update vars.php

* Update databases.php

* Update users.php

* Update default_settings.php

* Update domains.php

* Update groups.php

* Update menu.php
2022-01-13 11:37:59 -07:00
FusionPBX
c3ebda9378 Music on hold need recursive true because its creating the directory and another one with the sample rate. 2021-12-20 15:05:11 -07:00
FusionPBX
dd106a6871 Replace event_socket_mkdir with php mkdir. (#6170) 2021-12-02 19:03:55 -07:00
Nate
40bc5066f8 MOH - Add: Hide select when no Categories exist to select from. 2020-04-13 16:40:05 -06:00
Nate
88471e5aa3 MOH: Fix duplicate ID warning and playback. 2020-03-31 11:46:49 -06:00
Nate
d87fa6eb77 MOH: Allow deletion of files containing spaces. 2020-03-31 11:20:14 -06:00
Nate
d3943cb097 MOH: Minor adjustment. 2020-03-30 20:25:30 -06:00
Nate
aad703b018 MOH: Remove test mod. 2020-03-30 20:21:49 -06:00
Nate
365e20926f Safari Audio Support: Call Recordings, MOH, VM Greetings & Messages and CDR audio files. 2020-03-30 20:08:45 -06:00
Nate
6689b41e76 MOH: Always replace spaces in uploaded filenames. 2020-03-28 13:46:08 -06:00
Nate
865100a771 MOH: Cleanup. 2020-03-26 13:21:10 -06:00
Nate
3fafa20d9c MOH: Modal integration, and other bug fixes. 2020-03-26 13:19:18 -06:00
Nate
acff646b5b MOH: Delete bug fix. 2020-03-20 14:51:59 -06:00
Nate
7bb598375e Multiple - List: Button label & icon change. 2020-03-06 11:44:24 -07:00
Nate
7341236c85 MOH - List: Better indicate kHz value is an edit link. 2020-03-06 11:19:43 -07:00
Nate
029c7174b4 Multiple - Add IDs to common/default action buttons. 2020-03-05 00:05:45 -07:00
FusionPBX
8a3b9326ac Update music_on_hold.php 2020-01-21 16:53:13 -07:00
Nate
63811b841d MOH: Minor adjustments. 2019-12-16 12:29:03 -07:00
Nate
2e21be8cd4 MOH: List view updates. 2019-12-16 12:00:33 -07:00
FusionPBX
cf5bea7758 Update music_on_hold.php 2019-10-05 15:38:38 -06:00
Nate
fb1e8ea3ad Fix MOH delete. 2019-09-19 12:55:45 -06:00
FusionPBX
480aee4dda Update music_on_hold.php 2019-09-07 01:48:39 -06:00
Nate
733ba98dc6 Update to Bootstrap v4.3.1, jQuery 3.4.1. Adjustments to support updates. 2019-08-20 18:15:50 -06:00
Nate
f3d93171da Update music_on_hold.php 2019-08-19 07:35:12 -06:00
Nate
95d9a545b4 Update music_on_hold.php 2019-08-19 07:18:24 -06:00
Nate
60d141a82e Music on Hold: Database class integration. 2019-08-09 11:42:43 -06:00
markjcrane
a72f1d6266 Change messages class to message 2018-08-31 03:09:01 +00:00
FusionPBX
50e2f59746 Update music_on_hold.php 2018-07-09 14:03:39 -06:00
FusionPBX
dd30383eda Update music_on_hold.php 2018-07-02 10:03:49 -06:00
FusionPBX
3020c6cbbb Update music_on_hold.php 2018-07-01 10:36:10 -06:00
FusionPBX
6e054b0d6b Update music_on_hold.php 2018-06-05 18:29:26 -06:00
Mafoo
f0feb25016 Enhance - Convert more messages (#2646)
convert more messages to messages class
skipped dashboard messages due to them relying on $_SESSION['message']
to know if there has already been a change
2017-06-08 09:39:04 -06:00
FusionPBX
9619dacfbb Update music_on_hold.php 2017-03-22 22:53:27 -06:00
FusionPBX
a4ad4113cd Update music_on_hold.php
Fix the upload to specific music on hold categories and fix an issue with case sensitivity that prevented ability to delete a file with upper case letters.
2016-07-15 10:44:27 -06:00
FusionPBX
a9eaeb3c76 Update music_on_hold.php
Show global then local for those with music_on_hold_domain.
2016-07-06 14:13:17 -06:00
FusionPBX
886e178073 Update music_on_hold.php
Remove scope to simplify the interface after upload a user with the right permission can make it global.
2016-07-06 13:58:03 -06:00