append wildcards to search if user did not enter any
This commit is contained in:
@@ -319,6 +319,8 @@ class paging {
|
|||||||
$condition.= $searchfield . " ".$oper." " . Database::quote($searchtext);
|
$condition.= $searchfield . " ".$oper." " . Database::quote($searchtext);
|
||||||
} else {
|
} else {
|
||||||
$searchtext = str_replace('*', '%', $this->searchtext);
|
$searchtext = str_replace('*', '%', $this->searchtext);
|
||||||
|
// append wildcards if user did not enter any
|
||||||
|
if (strpos($searchtext,'%') === false) $searchtext='%'.$searchtext.'%';
|
||||||
$condition.= $searchfield . " LIKE " . Database::quote($searchtext);
|
$condition.= $searchfield . " LIKE " . Database::quote($searchtext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user