* Only do '*' parameter expansion on the first page of search
results: http://board.s9y.org/viewtopic.php?f=10&t=14810 (onli, Timbalu)
This commit is contained in:
parent
e0a2a62ac9
commit
3a0c55c6cd
@ -3,6 +3,10 @@
|
||||
Version 1.6 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Only do '*' parameter expansion on the first page of search
|
||||
results: http://board.s9y.org/viewtopic.php?f=10&t=14810
|
||||
(onli, Timbalu)
|
||||
|
||||
* RSS feed timestamp properly calculates offset (abdussamad)
|
||||
|
||||
* (experimental) global theme options (garvinhicking)
|
||||
|
@ -862,9 +862,12 @@ function &serendipity_searchEntries($term, $limit = '', $searchresults = '') {
|
||||
$search = array_merge($searchresults, $search);
|
||||
}
|
||||
|
||||
$p = (int)$serendipity['GET']['page'];
|
||||
if ($p == 0) $p = 1;
|
||||
|
||||
//if * wasn't already appended and if there are none or not enough
|
||||
//results, search again for entries containing the searchterm as a part
|
||||
if (strpos($term, '*') === false && $serendipity['dbType'] != 'sqlite' && $serendipity['dbType'] != 'sqlite3') {
|
||||
if ($p == 1 && strpos($term, '*') === false && $serendipity['dbType'] != 'sqlite' && $serendipity['dbType'] != 'sqlite3') {
|
||||
if (! is_array($search)) {
|
||||
return serendipity_searchEntries($term.'*', $orig_limit);
|
||||
}else if (count($search) < 4){
|
||||
|
Loading…
x
Reference in New Issue
Block a user