mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-08 04:33:49 +00:00
Add a new switch class with a method to get the directories needed for FreeSWITCH and add them to default settings -> switch category.
This commit is contained in:
@@ -17,25 +17,33 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
|
||||
//use the module class to get the list of modules from the db and add any missing modules
|
||||
//process one time
|
||||
if ($domains_processed == 1) {
|
||||
$mod = new modules;
|
||||
$mod->db = $db;
|
||||
$mod->dir = $_SESSION['switch']['mod']['dir'];
|
||||
$mod->get_modules();
|
||||
$mod->synch();
|
||||
$msg = $mod->msg;
|
||||
|
||||
//synchronize the modules
|
||||
save_module_xml();
|
||||
//add missing switch directories in default settings
|
||||
$switch = new switch;
|
||||
$switch->settings();
|
||||
unset($switch);
|
||||
|
||||
//use the module class to get the list of modules from the db and add any missing modules
|
||||
if (isset($_SESSION['switch']['mod']['dir'])) {
|
||||
$mod = new modules;
|
||||
$mod->db = $db;
|
||||
$mod->dir = $_SESSION['switch']['mod']['dir'];
|
||||
$mod->get_modules();
|
||||
$mod->synch();
|
||||
$msg = $mod->msg;
|
||||
|
||||
//save the modules.conf
|
||||
save_module_xml();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user