From: <mo...@us...> - 2004-04-28 23:26:20
|
Update of /cvsroot/tikiwiki/tiki/lib/trackers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14781/lib/trackers Modified Files: trackerlib.php Log Message: added joker (*) to filters to enable search on starting or ending chars Index: trackerlib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/trackers/trackerlib.php,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- trackerlib.php 25 Apr 2004 11:33:58 -0000 1.91 +++ trackerlib.php 28 Apr 2004 23:26:11 -0000 1.92 @@ -328,7 +328,13 @@ $corder = "asc"; } elseif ($filtervalue) { $mid.= "and ttif.`value` like ?"; - $bindvars[] = '%'.$filtervalue.'%'; + if (substr($filtervalue,0,1) == '*') { + $bindvars[] = '%'. substr($filtervalue,1); + } elseif (substr($filtervalue,-1,1) == '*') { + $bindvars[] = substr($filtervalue,0,strlen($filtervalue)-1). '%'; + } else { + $bindvars[] = '%'.$filtervalue.'%'; + } $csort_mode = $filterfield; $corder = "asc"; } else { |