1
0

Fixed pagination when searching terms with fetchlimit < 4

This commit is contained in:
Ian
2013-09-01 13:53:17 +02:00
parent 1c41825a50
commit ff2c3b916a
2 changed files with 11 additions and 2 deletions

View File

@ -3,6 +3,8 @@
Version trunk master ()
------------------------------------------------------------------------
* Fixed pagination when searching terms with fetchlimit < 4
* Fixed deprecated /e modifier with PHP >= 5.5 in nl2br plugin restore method

View File

@ -887,8 +887,15 @@ function &serendipity_searchEntries($term, $limit = '', $searchresults = '') {
if ($p == 1 && strpos($term, '*') === false && $serendipity['dbType'] != 'sqlite' && $serendipity['dbType'] != 'sqlite3' && $serendipity['dbType'] != 'pdo-sqlite') {
if (! is_array($search)) {
return serendipity_searchEntries($term.'*', $orig_limit);
}else if (count($search) < 4){
return serendipity_searchEntries($term.'*', $orig_limit, $search);
} else {
$ec = count($search);
$checkcount = 4;
if ($serendipity['fetchLimit'] < $checkcount) {
$checkcount = $serendipity['fetchLimit'];
}
if ($ec < $checkcount) {
return serendipity_searchEntries($term.'*', $orig_limit, $search);
}
}
}