Improve the upgrade efficiency.

This commit is contained in:
Mark Crane
2012-08-11 22:50:12 +00:00
parent dd0b7a3c79
commit 8e8816ffdb
+7 -2
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,12 +175,16 @@
foreach ($default_list as &$default_path) { foreach ($default_list as &$default_path) {
include($default_path); include($default_path);
} }
//track of the number of domains processed
$domains_processed++;
}
unset ($v_prep_statement);
//synchronize the dialplan //synchronize the dialplan
if (function_exists('save_dialplan_xml')) { if (function_exists('save_dialplan_xml')) {
save_dialplan_xml(); save_dialplan_xml();
} }
}
unset ($v_prep_statement);
//clear the session variables //clear the session variables
unset($_SESSION['domain']); unset($_SESSION['domain']);