Remove $p == 1 search wildcard requirement (#309)
The bug meant to be fixed in https://github.com/s9y/Serendipity/commit/51208e0f726cfc3a7b65360be6a58a5fcd1c3968#diff-cbbd600f627a5af39c73092fbc3fbf46 is not reproducible anymore
This commit is contained in:
@@ -873,13 +873,10 @@ 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 ($p == 1 && strpos($term, '*') === false && $serendipity['dbType'] != 'sqlite' && $serendipity['dbType'] != 'sqlite3' && $serendipity['dbType'] != 'pdo-sqlite' && $serendipity['dbType'] != 'sqlite3oo') {
|
||||
if (strpos($term, '*') === false && $serendipity['dbType'] != 'sqlite' && $serendipity['dbType'] != 'sqlite3' && $serendipity['dbType'] != 'pdo-sqlite' && $serendipity['dbType'] != 'sqlite3oo') {
|
||||
if (! is_array($search)) {
|
||||
return serendipity_searchEntries($term.'*', $orig_limit);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user