Merged patch #437514
This commit is contained in:
@@ -83,7 +83,7 @@ else {
|
|||||||
}
|
}
|
||||||
$sql_query .= " from $table";
|
$sql_query .= " from $table";
|
||||||
if ($where != "") {
|
if ($where != "") {
|
||||||
$sql_query .= " where $where";
|
$sql_query .= ' where ' . ((get_magic_quotes_gpc()) ? stripslashes($where) : $where);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql_query .= " where 1";
|
$sql_query .= " where 1";
|
||||||
@@ -93,14 +93,20 @@ else {
|
|||||||
if ($types[$i]=="string"||$types[$i]=="blob") {
|
if ($types[$i]=="string"||$types[$i]=="blob") {
|
||||||
$quot="\"";
|
$quot="\"";
|
||||||
$cmp="like";
|
$cmp="like";
|
||||||
|
if (!get_magic_quotes_gpc()) $fields[$i] = str_replace('"', '\\"', $fields[$i]);
|
||||||
}
|
}
|
||||||
else if ($types[$i]=="date"||$types[$i]=="time") {
|
else if ($types[$i]=="date"||$types[$i]=="time") {
|
||||||
$quot="\"";
|
$quot="\"";
|
||||||
$cmp="=";
|
$cmp="=";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$cmp="=";
|
if (strstr($fields[$i], '%')) {
|
||||||
$quot="";
|
$cmp='LIKE';
|
||||||
|
$quot='"';
|
||||||
|
} else {
|
||||||
|
$cmp='=';
|
||||||
|
$quot='';
|
||||||
|
}
|
||||||
if (substr($fields[$i],0,1)=="<" || substr($fields[$i],0,1)==">") $cmp="";
|
if (substr($fields[$i],0,1)=="<" || substr($fields[$i],0,1)==">") $cmp="";
|
||||||
}
|
}
|
||||||
$sql_query .= " and $names[$i] $cmp $quot$fields[$i]$quot";
|
$sql_query .= " and $names[$i] $cmp $quot$fields[$i]$quot";
|
||||||
|
Reference in New Issue
Block a user