Remove save_module_xml() function and move it it into the modules class as the xml method. Eventual goal move everything out of switch.php.

This commit is contained in:
markjcrane
2016-05-26 11:21:37 -06:00
parent 8784787531
commit 7fff69f791
5 changed files with 65 additions and 67 deletions

View File

@@ -89,18 +89,18 @@ if($fp){
}
//use the module class to get the list of modules from the db and add any missing modules
$mod = new modules;
$mod->db = $db;
$mod->dir = $_SESSION['switch']['mod']['dir'];
$mod->get_modules();
$result = $mod->modules;
$module = new modules;
$module->db = $db;
$module->dir = $_SESSION['switch']['mod']['dir'];
$module->get_modules();
$result = $module->modules;
$module_count = count($result);
$mod->synch();
$msg = $mod->msg;
$module->synch();
$module->xml();
$msg = $module->msg;
//show the msg
if ($msg) {
save_module_xml();
echo "<div align='center'>\n";
echo "<table width='40%'>\n";
echo "<tr>\n";