From dd4cfebe75c0dcac19755a75b5cb7232e838cae8 Mon Sep 17 00:00:00 2001 From: Michael Wyraz Date: Mon, 22 Aug 2016 15:55:13 +0200 Subject: [PATCH] append wildcards to search if user did not enter any --- lib/classes/output/class.paging.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/classes/output/class.paging.php b/lib/classes/output/class.paging.php index a903622c..62384248 100644 --- a/lib/classes/output/class.paging.php +++ b/lib/classes/output/class.paging.php @@ -319,6 +319,8 @@ class paging { $condition.= $searchfield . " ".$oper." " . Database::quote($searchtext); } else { $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); }