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