Efficiency enhancement for upgrade and upgrade_schema by running global tasks one time rather than for each domain.

This commit is contained in:
Mark Crane
2012-08-14 21:59:45 +00:00
parent cc9fbb99a3
commit 17af99d5e5
14 changed files with 562 additions and 459 deletions

View File

@@ -24,16 +24,19 @@
Mark J Crane <markjcrane@fusionpbx.com>
*/
//use the module class to get the list of modules from the db and add any missing modules
require_once "includes/classes/switch_modules.php";
$mod = new switch_modules;
$mod->db = $db;
$mod->dir = $_SESSION['switch']['mod']['dir'];
$mod->get_modules();
$mod->synch();
$msg = $mod->msg;
// synchronize the modules
save_module_xml();
//use the module class to get the list of modules from the db and add any missing modules
if ($domains_processed == 1) {
require_once "includes/classes/switch_modules.php";
$mod = new switch_modules;
$mod->db = $db;
$mod->dir = $_SESSION['switch']['mod']['dir'];
$mod->get_modules();
$mod->synch();
$msg = $mod->msg;
//synchronize the modules
save_module_xml();
}
?>