- quote string for search query

This commit is contained in:
steinm 2011-12-03 11:13:14 +00:00
parent 2128a00435
commit d332984803

View File

@ -441,7 +441,7 @@ class LetoDMS_Core_DMS {
foreach ($tkeys as $key) {
$key = trim($key);
if (strlen($key)>0) {
$searchKey = (strlen($searchKey)==0 ? "" : $searchKey." ".$mode." ").$concatFunction." LIKE '%".$key."%'";
$searchKey = (strlen($searchKey)==0 ? "" : $searchKey." ".$mode." ").$concatFunction." LIKE ".$this->db->qstr('%'.$key.'%');
}
}
}
@ -553,7 +553,7 @@ class LetoDMS_Core_DMS {
foreach ($tkeys as $key) {
$key = trim($key);
if (strlen($key)>0) {
$searchKey = (strlen($searchKey)==0 ? "" : $searchKey." ".$mode." ").$concatFunction." LIKE '%".$key."%'";
$searchKey = (strlen($searchKey)==0 ? "" : $searchKey." ".$mode." ").$concatFunction." LIKE ".$this->db->qstr('%'.$key.'%');
}
}
}