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
This commit is contained in:
frytimo
2025-03-12 13:55:47 -06:00
committed by GitHub
parent abb95e38bb
commit 08001488f4
110 changed files with 209 additions and 520 deletions
@@ -2,11 +2,7 @@
/**
* access controls class
*
* @method null download
*/
if (!class_exists('access_controls')) {
class access_controls {
/**
@@ -264,6 +260,3 @@ if (!class_exists('access_controls')) {
}
}
}
}
?>
@@ -27,7 +27,6 @@
/**
* Define the operator_panel class
*/
if (!class_exists('basic_operator_panel')) {
class basic_operator_panel {
/**
@@ -245,6 +244,3 @@ if (!class_exists('basic_operator_panel')) {
return $result;
}
}
}
?>
@@ -25,7 +25,6 @@
*/
//define the bridges class
if (!class_exists('bridges')) {
class bridges {
/**
@@ -255,6 +254,3 @@ if (!class_exists('bridges')) {
}
}
}
?>
@@ -2,10 +2,7 @@
/**
* call block class
*
* @method null download
*/
if (!class_exists('call_block')) {
class call_block {
/**
@@ -459,6 +456,3 @@ if (!class_exists('call_block')) {
} //method
} //class
}
?>
@@ -27,10 +27,7 @@
/**
* call broadcast class
*
* @method null download
*/
if (!class_exists('call_broadcast')) {
class call_broadcast {
/**
@@ -177,6 +174,3 @@ if (!class_exists('call_broadcast')) {
}
}
}
?>
@@ -26,11 +26,8 @@
/**
* cache class provides an abstracted cache
*
* @method string dialplan - builds the dialplan for call center
*/
//define the call center class
if (!class_exists('call_center')) {
class call_center {
/**
* define the variables
@@ -611,7 +608,6 @@
} //method
} //class
}
/*
$o = new call_center;
@@ -625,5 +621,3 @@ $c->destination_number = "";
$c->queue_cc_exit_keys = "";
$c->dialplan();
*/
?>
+1 -2
View File
@@ -27,8 +27,7 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
//check permisions
@@ -25,7 +25,6 @@
*/
//define the call_flows class
if (!class_exists('call_flows')) {
class call_flows {
/**
@@ -410,6 +409,3 @@ if (!class_exists('call_flows')) {
} //method
} //class
}
?>
-1
View File
@@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
-1
View File
@@ -421,7 +421,6 @@
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
@@ -248,7 +248,6 @@
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
@@ -261,7 +261,6 @@
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
@@ -426,7 +426,6 @@
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
@@ -26,10 +26,7 @@
/**
* call_recordings class
*
* @method null download
*/
if (!class_exists('call_recordings')) {
class call_recordings {
/**
@@ -525,6 +522,3 @@ if (!class_exists('call_recordings')) {
}
} //class
}
?>
-1
View File
@@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@@ -26,7 +26,6 @@ Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
//define the conference centers class
if (!class_exists('conference_centers')) {
class conference_centers {
/**
@@ -800,7 +799,7 @@ if (!class_exists('conference_centers')) {
} //class
}
//example conference center
/*
@@ -814,5 +813,3 @@ if (!class_exists('conference_centers')) {
$result = $conference_center->rooms();
print_r($result);
*/
?>
-1
View File
@@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@@ -26,12 +26,7 @@
/**
* conference_controls class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('conference_controls')) {
class conference_controls {
/**
@@ -426,6 +421,3 @@ if (!class_exists('conference_controls')) {
}
}
}
?>
@@ -26,12 +26,7 @@
/**
* conference_profiles class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('conference_profiles')) {
class conference_profiles {
/**
@@ -432,6 +427,3 @@ if (!class_exists('conference_profiles')) {
}
}
}
?>
@@ -25,7 +25,6 @@
*/
//define the conferences class
if (!class_exists('conferences')) {
class conferences {
/**
@@ -374,6 +373,3 @@ if (!class_exists('conferences')) {
}
}
}
?>
-1
View File
@@ -1964,7 +1964,6 @@
echo " ".$text['label-destination_hold_music']."\n";
echo "</td>\n";
echo "<td width=\"70%\" class='vtable' align='left'>\n";
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
$music_on_hold = new switch_music_on_hold;
echo $music_on_hold->select('destination_hold_music', $destination_hold_music, null);
echo " <br />\n";
@@ -26,11 +26,7 @@
/**
* destinations
*
* @method get_array get the destinations
* @method select build the html select
*/
if (!class_exists('destinations')) {
class destinations {
/**
@@ -455,26 +451,24 @@ if (!class_exists('destinations')) {
$destination_id = str_replace("[", "_", $destination_id);
//$destination_id = preg_replace('/[^a-zA-Z_,.]/', '', $destination_name);
?>
<script type="text/javascript">
function get_destinations(id, destination_type, action, search) {
//alert(action);
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById(id).innerHTML = this.responseText;
}
};
if (action) {
xhttp.open("GET", "/app/destinations/resources/destinations.php?destination_type="+destination_type+"&action="+action, true);
}
else {
xhttp.open("GET", "/app/destinations/resources/destinations.php?destination_type="+destination_type, true);
}
xhttp.send();
}
</script>
<?php
//send request for destinations
echo "<script type=\"text/javascript\">\n";
echo " function get_destinations(id, destination_type, action, search) {\n";
echo " var xhttp = new XMLHttpRequest();\n";
echo " xhttp.onreadystatechange = function() {\n";
echo " if (this.readyState == 4 && this.status == 200) {\n";
echo " document.getElementById(id).innerHTML = this.responseText;\n";
echo " }\n";
echo " };\n";
echo " if (action) {\n";
echo " xhttp.open(\"GET\", \"/app/destinations/resources/destinations.php?destination_type=\"+destination_type+\"&action=\"+action, true);\n";
echo " }\n";
echo " else {\n";
echo " xhttp.open(\"GET\", \"/app/destinations/resources/destinations.php?destination_type=\"+destination_type, true);\n";
echo " }\n";
echo " xhttp.send();\n";
echo " }\n";
echo "</script>\n";
//get the destinations
$destinations = $this->get($destination_type);
@@ -1308,7 +1302,7 @@ if (!class_exists('destinations')) {
} //method
} //class
}
/*
$obj = new destinations;
//$destinations = $obj->destinations;
@@ -1319,5 +1313,3 @@ echo $obj->select('ivr', 'example4', '');
echo $obj->select('ivr', 'example5', '');
echo $obj->select('ivr', 'example6', '');
*/
?>
@@ -25,7 +25,6 @@
*/
//define the dialplan class
if (!class_exists('dialplan')) {
class dialplan {
//variables
@@ -1580,6 +1579,3 @@
} //class
}
?>
@@ -2,12 +2,7 @@
/**
* email_queue class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('email_queue')) {
class email_queue {
/**
@@ -225,6 +220,3 @@ if (!class_exists('email_queue')) {
}
}
}
?>
@@ -11,7 +11,6 @@
//includes files
require_once "resources/pdo.php";
include "resources/classes/permissions.php";
require $_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/functions/transcribe.php";
//increase limits
@@ -10,7 +10,6 @@
}
//include files
include "resources/classes/permissions.php";
include_once "resources/phpmailer/class.phpmailer.php";
include_once "resources/phpmailer/class.smtp.php";
@@ -9,9 +9,6 @@
exit;
}
//include files
include "resources/classes/permissions.php";
//increase limits
set_time_limit(0);
ini_set('max_execution_time', 0);
@@ -26,12 +26,7 @@
/**
* event_guard_logs class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('event_guard')) {
class event_guard {
/**
@@ -303,6 +298,3 @@ if (!class_exists('event_guard')) {
}
}
}
?>
@@ -26,12 +26,7 @@
/**
* extension_settings class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('extension_settings')) {
class extension_settings {
/**
@@ -272,6 +267,3 @@ if (!class_exists('extension_settings')) {
}
}
}
?>
-1
View File
@@ -186,7 +186,6 @@
//synchronize configuration
if (is_writable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
-2
View File
@@ -850,7 +850,6 @@
//synchronize configuration
if (is_writable($switch_extensions)) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
@@ -2037,7 +2036,6 @@
echo " ".$text['label-hold_music']."\n";
echo "</td>\n";
echo "<td width=\"70%\" class='vtable' align='left'>\n";
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
$options = '';
$moh = new switch_music_on_hold;
echo $moh->select('hold_music', $hold_music ?? '', $options);
@@ -25,7 +25,6 @@
*/
//define the directory class
if (!class_exists('extension')) {
class extension {
/**
@@ -795,6 +794,3 @@ if (!class_exists('extension')) {
}
}
}
?>
-1
View File
@@ -29,7 +29,6 @@
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/functions/object_to_array.php";
require_once "resources/functions/parse_message.php";
require_once "resources/classes/text.php";
//get accounts to monitor
$sql = "select d.domain_name, f.* ";
-4
View File
@@ -25,7 +25,6 @@
*/
//define the fax class
if (!class_exists('fax')) {
class fax {
/**
@@ -725,7 +724,6 @@ if (!class_exists('fax')) {
}
} //class
}
/*
$o = new fax;
@@ -738,5 +736,3 @@ $c->destination_number = $fax_destination_number;
$c->fax_description = $fax_description;
$c->dialplan();
*/
?>
@@ -26,12 +26,7 @@
/**
* fax_queue class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('fax_queue')) {
class fax_queue {
/**
@@ -274,6 +269,3 @@ if (!class_exists('fax_queue')) {
}
}
}
}
?>
@@ -8,7 +8,6 @@
//includes files
require_once dirname(__DIR__, 4) . "/resources/require.php";
require_once "resources/pdo.php";
include "resources/classes/permissions.php";
//increase limits
set_time_limit(0);
-8
View File
@@ -2,12 +2,7 @@
/**
* fifo class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('fifo')) {
class fifo {
/**
@@ -283,6 +278,3 @@ if (!class_exists('fifo')) {
}
}
}
?>
@@ -25,7 +25,6 @@
*/
//define the gateways class
if (!class_exists('gateways')) {
class gateways {
/**
@@ -583,6 +582,3 @@ if (!class_exists('gateways')) {
}
}
}
?>
@@ -25,7 +25,6 @@
*/
//define the ivr_menu class
if (!class_exists('ivr_menu')) {
class ivr_menu {
/**
@@ -489,6 +488,3 @@ if (!class_exists('ivr_menu')) {
}
}
}
?>
-1
View File
@@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@@ -25,7 +25,6 @@
*/
//define the modules class
if (!class_exists('modules')) {
class modules {
/**
@@ -1101,10 +1100,8 @@ if (!class_exists('modules')) {
} //class
}
/*
require_once "resources/classes/modules.php";
$mod = new modules;
$mod->dir = $_SESSION['switch']['mod']['dir'];
echo $mod->dir."\n";
@@ -1138,5 +1135,3 @@ echo $mod->dir."\n";
//print_r($result);
//echo "</pre>\n";
*/
?>
-1
View File
@@ -308,7 +308,6 @@
$cache = new cache;
$cache->delete("configuration:local_stream.conf");
//require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
$music = new switch_music_on_hold;
$music->reload();
@@ -27,7 +27,6 @@
*/
//define the switch_music_on_hold class
if (!class_exists('switch_music_on_hold')) {
class switch_music_on_hold {
/**
@@ -85,7 +84,6 @@ if (!class_exists('switch_music_on_hold')) {
}
//recordings
if (is_dir($_SERVER["PROJECT_ROOT"].'/app/recordings')) {
require_once "app/recordings/resources/classes/switch_recordings.php";
$recordings_c = new switch_recordings;
$recordings = $recordings_c->list_recordings();
if (is_array($recordings) && sizeof($recordings) > 0) {
@@ -447,12 +445,9 @@ if (!class_exists('switch_music_on_hold')) {
} //method
} //class
}
//build and save the XML
//require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
//$moh = new switch_music_on_hold;
//$moh->xml();
//$moh->save();
?>
-1
View File
@@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@@ -25,7 +25,6 @@
*/
//define the number translations class
if (!class_exists('number_translations')) {
class number_translations {
/**
@@ -414,11 +413,8 @@ if (!class_exists('number_translations')) {
} //method
} //class
}
/*
$obj = new number_translations;
$obj->delete();
*/
?>
@@ -25,7 +25,6 @@
*/
//define the phrases class
if (!class_exists('phrases')) {
class phrases {
/**
@@ -431,6 +430,3 @@ if (!class_exists('phrases')) {
} //method
} //class
}
?>
@@ -25,7 +25,6 @@
*/
//define the pin numbers class
if (!class_exists('pin_numbers')) {
class pin_numbers {
/**
@@ -245,6 +244,3 @@ if (!class_exists('pin_numbers')) {
}
}
}
?>
@@ -26,7 +26,6 @@
*/
//define the switch_recordings class
if (!class_exists('switch_recordings')) {
class switch_recordings {
/**
@@ -158,6 +157,3 @@ if (!class_exists('switch_recordings')) {
} //method
} //class
}
?>
-1
View File
@@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
-1
View File
@@ -88,7 +88,6 @@
$registrations = $obj->get($profile ?? null);
//order the array
require_once "resources/classes/array_order.php";
$order = new array_order();
$registrations = $order->sort($registrations, 'sip-auth-realm', 'user');
@@ -25,7 +25,6 @@
*/
//define the ring groups class
if (!class_exists('ring_groups')) {
class ring_groups {
/**
@@ -512,6 +511,3 @@ if (!class_exists('ring_groups')) {
}
}
}
?>
-1
View File
@@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@@ -25,7 +25,6 @@
*/
//define the sip profiles class
if (!class_exists('sip_profiles')) {
class sip_profiles {
/**
@@ -434,6 +433,3 @@ if (!class_exists('sip_profiles')) {
}
}
}
?>
@@ -26,12 +26,7 @@
/**
* sofia_global_settings class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('sofia_global_settings')) {
class sofia_global_settings {
/**
@@ -247,6 +242,3 @@ if (!class_exists('sofia_global_settings')) {
}
}
}
?>
@@ -25,7 +25,6 @@
*/
//define the streams class
if (!class_exists('streams')) {
class streams {
/**
@@ -244,6 +243,3 @@ if (!class_exists('streams')) {
}
}
}
?>
+1 -9
View File
@@ -23,12 +23,7 @@
/**
* presence class
*
* @method boolean active
* @method array show
*/
if (!class_exists('presence')) {
class presence {
/**
@@ -84,7 +79,6 @@ if (!class_exists('presence')) {
return $array;
}
}
}
//examples
/*
@@ -97,11 +91,9 @@ if (!class_exists('presence')) {
echo "active: true\n";
}
else {
echo "active: false\n";
echo "active: false\n";
}
//show active the presence
$presence = new presence;
$array = $presence->show();
*/
?>
@@ -25,7 +25,6 @@
Matthew Vale <github@mafoo.org>
*/
if (!class_exists('ringbacks')) {
class ringbacks {
//define variables
@@ -85,18 +84,15 @@ if (!class_exists('ringbacks')) {
*/
//get the tones
require_once "resources/classes/tones.php";
$tones = new tones;
$this->tones_list = $tones->tones_list();
//get music on hold and recordings
if (is_dir($_SERVER["PROJECT_ROOT"].'/app/music_on_hold')) {
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
$music = new switch_music_on_hold;
$this->music_list = $music->get();
}
if (is_dir($_SERVER["PROJECT_ROOT"].'/app/recordings')) {
require_once "app/recordings/resources/classes/switch_recordings.php";
$recordings = new switch_recordings;
$this->recordings_list = $recordings->list_recordings();
}
@@ -232,6 +228,3 @@ if (!class_exists('ringbacks')) {
return $select;
}
}
}
?>
@@ -26,12 +26,7 @@
/**
* switch class provides methods for copying switch_files
*
* @method string correct_path
* @method string copy_scripts
* @method string copy_languages
*/
if (!class_exists('switch_files')) {
class switch_files {
/**
@@ -158,7 +153,6 @@ if (!class_exists('switch_files')) {
}
}
}
/*
//example use
@@ -168,5 +162,3 @@ if (!class_exists('switch_files')) {
$obj->copy_scripts();
$obj->copy_languages();
*/
?>
@@ -25,7 +25,6 @@
*/
//define the time conditions class
if (!class_exists('time_conditions')) {
class time_conditions {
/**
@@ -346,6 +345,3 @@
} //class
}
?>
-4
View File
@@ -25,7 +25,6 @@
*/
//define the vars class
if (!class_exists('vars')) {
class vars {
/**
@@ -258,6 +257,3 @@ if (!class_exists('vars')) {
}
}
}
?>
@@ -25,7 +25,6 @@
*/
//define the voicemail greetings class
if (!class_exists('voicemail_greetings')) {
class voicemail_greetings {
/**
@@ -166,6 +165,3 @@ if (!class_exists('voicemail_greetings')) {
} //method
} //class
}
?>
-1
View File
@@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@@ -1581,7 +1581,6 @@
}
//example voicemail messages
//require_once "app/voicemails/resources/classes/voicemail.php";
//$voicemail = new voicemail;
//$voicemail->voicemail_uuid = $voicemail_uuid;
//$voicemail->order_by = $order_by;
@@ -23,9 +23,6 @@
//voicemail
echo "<div class='hud_box'>\n";
//required class
require_once "app/voicemails/resources/classes/voicemail.php";
//get the voicemail
$vm = new voicemail;
$vm->domain_uuid = $_SESSION['domain_uuid'];
@@ -47,7 +47,6 @@
//toggle the voicemail message
$toggled = 0;
if (is_array($voicemail_messages) && sizeof($voicemail_messages) > 0) {
require_once "resources/classes/voicemail.php";
foreach ($voicemail_messages as $voicemail_uuid => $voicemail_message_uuids) {
foreach ($voicemail_message_uuids as $voicemail_message_uuid) {
if (is_uuid($voicemail_uuid) && is_uuid($voicemail_message_uuid)) {
-1
View File
@@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@@ -26,10 +26,7 @@
/**
* xml_cdr class provides methods for adding cdr records to the database
*
* @method boolean add
*/
if (!class_exists('xml_cdr')) {
class xml_cdr {
/**
@@ -2370,4 +2367,3 @@ if (!class_exists('xml_cdr')) {
}
} //class
}
-1
View File
@@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;