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:
markjcrane
2016-04-02 17:53:51 -06:00
parent 23ab685ae3
commit 562f000356
3 changed files with 263 additions and 52 deletions

View File

@@ -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();
}
}
?>