Improve the upgrade efficiency.

This commit is contained in:
Mark Crane
2012-08-11 22:50:12 +00:00
parent dd0b7a3c79
commit 8e8816ffdb

View File

@@ -110,6 +110,7 @@
$v_prep_statement->execute();
$main_result = $v_prep_statement->fetchAll(PDO::FETCH_ASSOC);
$domain_count = count($main_result);
$domains_processed = 1;
foreach ($main_result as &$row) {
//get the values from database and set them as php variables
$domain_uuid = $row["domain_uuid"];
@@ -174,13 +175,17 @@
foreach ($default_list as &$default_path) {
include($default_path);
}
// synchronize the dialplan
if (function_exists('save_dialplan_xml')) {
save_dialplan_xml();
}
//track of the number of domains processed
$domains_processed++;
}
unset ($v_prep_statement);
//synchronize the dialplan
if (function_exists('save_dialplan_xml')) {
save_dialplan_xml();
}
//clear the session variables
unset($_SESSION['domain']);
unset($_SESSION['switch']);