Fixed pagination when searching terms with fetchlimit < 4
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user