Update database.php

This commit is contained in:
FusionPBX 2017-07-04 09:48:52 -06:00 committed by GitHub
parent 80ca544723
commit c6c5c012e1
1 changed files with 12 additions and 0 deletions

View File

@ -1244,6 +1244,9 @@ include "root.php";
if (strlen($array_value) == 0) {
$sql .= "null, ";
}
elseif ($array_value == "now()") {
$sql .= "now(), ";
}
else {
$sql .= "'".check_str($array_value)."', ";
}
@ -1303,6 +1306,9 @@ include "root.php";
if (strlen($array_value) == 0) {
$sql .= check_str($array_key)." = null, ";
}
elseif ($array_value == "now()") {
$sql .= check_str($array_key)." = now(), ";
}
else {
$sql .= check_str($array_key)." = '".check_str($array_value)."', ";
}
@ -1431,6 +1437,9 @@ include "root.php";
if (strlen($v) == 0) {
$sql .= check_str($k)." = null, ";
}
elseif ($v == "now()") {
$sql .= check_str($k)." = now(), ";
}
else {
$sql .= check_str($k)." = '".check_str($v)."', ";
}
@ -1530,6 +1539,9 @@ include "root.php";
if (strlen($v) == 0) {
$sql .= "null, ";
}
elseif ($v == "now()") {
$sql .= "now(), ";
}
else {
$sql .= "'".check_str($v)."', ";
}