for the specific language governing rights and limitations under the
	License.

	The Original Code is FusionPBX

	The Initial Developer of the Original Code is
	Mark J Crane <*****@*****.**>
	Portions created by the Initial Developer are Copyright (C) 2008-2016
	the Initial Developer. All Rights Reserved.

	Contributor(s):
	Mark J Crane <*****@*****.**>
*/
//process one time
if ($domains_processed == 1) {
    //add missing switch directories in default settings
    $obj = new switch_settings();
    $obj->settings();
    unset($obj);
    //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();
    }
}
Exemple #2
0
    echo "<div align='center'>\n";
    echo "<table width='40%'>\n";
    echo "<tr>\n";
    echo "<th align='left'>" . $text['label-message'] . "</th>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td class='row_style1'><strong>{$msg}</strong></td>\n";
    echo "</tr>\n";
    echo "</table>\n";
    echo "</div>\n";
}
//use the module class to get the list of modules from the db and add any missing modules
$module = new modules();
$module->db = $db;
$module->dir = $_SESSION['switch']['mod']['dir'];
$module->get_modules();
$result = $module->modules;
$module_count = count($result);
$module->synch();
$module->xml();
$msg = $module->msg;
//show the msg
if ($msg) {
    echo "<div align='center'>\n";
    echo "<table width='40%'>\n";
    echo "<tr>\n";
    echo "<th align='left'>" . $text['label-message'] . "</th>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td class='row_style1'>{$msg}</td>\n";
    echo "</tr>\n";