mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-08 09:43:01 +02:00
- removed #debug css rule (why would we need that in default-layout?)
- order by rank is not available in calendar/chronology mode - small non-functional change in functions_search.inc.php (handy for plugin) - unused variables/smaller code/unused params in func call git-svn-id: http://piwigo.org/svn/trunk@2572 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -299,7 +299,7 @@ SELECT DISTINCT(id)
|
||||
* @param string field
|
||||
* @return string
|
||||
*/
|
||||
function get_qsearch_like_clause($q, $field)
|
||||
function get_qsearch_like_clause($q, $field, $before='%', $after='%')
|
||||
{
|
||||
$q = stripslashes($q);
|
||||
$tokens = array();
|
||||
@@ -393,7 +393,7 @@ function get_qsearch_like_clause($q, $field)
|
||||
continue;
|
||||
if ( strlen($tokens[$i])==0)
|
||||
continue;
|
||||
$clauses[] = $field.' LIKE "%'.addslashes($tokens[$i]).'%"';
|
||||
$clauses[] = $field.' LIKE "'.$before.addslashes($tokens[$i]).$after.'"';
|
||||
}
|
||||
|
||||
return count($clauses) ? '('.implode(' OR ', $clauses).')' : null;
|
||||
|
||||
Reference in New Issue
Block a user