Update domains.php
This commit is contained in:
parent
ae6b922736
commit
eae6c0aa92
|
|
@ -450,6 +450,7 @@ if (!class_exists('domains')) {
|
||||||
|
|
||||||
//add the missing default settings
|
//add the missing default settings
|
||||||
if (is_array($array) && count($array) > 0) {
|
if (is_array($array) && count($array) > 0) {
|
||||||
|
foreach ($array as $row) {
|
||||||
$sql = "insert into v_default_settings (";
|
$sql = "insert into v_default_settings (";
|
||||||
$sql .= "default_setting_uuid, ";
|
$sql .= "default_setting_uuid, ";
|
||||||
$sql .= "default_setting_category, ";
|
$sql .= "default_setting_category, ";
|
||||||
|
|
@ -459,8 +460,6 @@ if (!class_exists('domains')) {
|
||||||
$sql .= "default_setting_enabled, ";
|
$sql .= "default_setting_enabled, ";
|
||||||
$sql .= "default_setting_description ";
|
$sql .= "default_setting_description ";
|
||||||
$sql .= ") values \n";
|
$sql .= ") values \n";
|
||||||
$i = 1;
|
|
||||||
foreach ($array as $row) {
|
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "'".check_str($row['default_setting_uuid'])."', ";
|
$sql .= "'".check_str($row['default_setting_uuid'])."', ";
|
||||||
$sql .= "'".check_str($row['default_setting_category'])."', ";
|
$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_value'])."', ";
|
||||||
$sql .= "'".check_str($row['default_setting_enabled'])."', ";
|
$sql .= "'".check_str($row['default_setting_enabled'])."', ";
|
||||||
$sql .= "'".check_str($row['default_setting_description'])."' ";
|
$sql .= "'".check_str($row['default_setting_description'])."' ";
|
||||||
$sql .= ")";
|
$sql .= ");";
|
||||||
if ($array_count != $i) {
|
|
||||||
$sql .= ",\n";
|
|
||||||
}
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
//echo $sql."\n";
|
//echo $sql."\n";
|
||||||
$this->db->exec(check_sql($sql));
|
$this->db->exec(check_sql($sql));
|
||||||
unset($array);
|
unset($array);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} //end settings method
|
} //end settings method
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue