Update domains.php

This commit is contained in:
FusionPBX 2017-01-17 14:02:36 -07:00 committed by GitHub
parent ae6b922736
commit eae6c0aa92
1 changed files with 13 additions and 18 deletions

View File

@ -450,6 +450,7 @@ if (!class_exists('domains')) {
//add the missing default settings
if (is_array($array) && count($array) > 0) {
foreach ($array as $row) {
$sql = "insert into v_default_settings (";
$sql .= "default_setting_uuid, ";
$sql .= "default_setting_category, ";
@ -459,8 +460,6 @@ if (!class_exists('domains')) {
$sql .= "default_setting_enabled, ";
$sql .= "default_setting_description ";
$sql .= ") values \n";
$i = 1;
foreach ($array as $row) {
$sql .= "(";
$sql .= "'".check_str($row['default_setting_uuid'])."', ";
$sql .= "'".check_str($row['default_setting_category'])."', ";
@ -469,16 +468,12 @@ if (!class_exists('domains')) {
$sql .= "'".check_str($row['default_setting_value'])."', ";
$sql .= "'".check_str($row['default_setting_enabled'])."', ";
$sql .= "'".check_str($row['default_setting_description'])."' ";
$sql .= ")";
if ($array_count != $i) {
$sql .= ",\n";
}
$i++;
}
$sql .= ");";
//echo $sql."\n";
$this->db->exec(check_sql($sql));
unset($array);
}
}
} //end settings method
}
}