mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17422] Fix author_id search results sorting
PHPBB-17422
This commit is contained in:
parent
725cbd31c8
commit
be52902541
1 changed files with 2 additions and 14 deletions
|
@ -76,17 +76,10 @@ class base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// change the start to the actual end of the current request if the sort direction differs
|
// If the sort direction differs from the direction in the cache, then reverse the ids array
|
||||||
// from the dirction in the cache and reverse the ids later
|
|
||||||
if ($reverse_ids)
|
if ($reverse_ids)
|
||||||
{
|
{
|
||||||
$start = $result_count - $start - $per_page;
|
$stored_ids = array_reverse($stored_ids);
|
||||||
|
|
||||||
// the user requested a page past the last index
|
|
||||||
if ($start < 0)
|
|
||||||
{
|
|
||||||
return SEARCH_RESULT_NOT_IN_CACHE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = $start, $n = $start + $per_page; ($i < $n) && ($i < $result_count); $i++)
|
for ($i = $start, $n = $start + $per_page; ($i < $n) && ($i < $result_count); $i++)
|
||||||
|
@ -102,11 +95,6 @@ class base
|
||||||
}
|
}
|
||||||
unset($stored_ids);
|
unset($stored_ids);
|
||||||
|
|
||||||
if ($reverse_ids)
|
|
||||||
{
|
|
||||||
$id_ary = array_reverse($id_ary);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$complete)
|
if (!$complete)
|
||||||
{
|
{
|
||||||
return SEARCH_RESULT_INCOMPLETE;
|
return SEARCH_RESULT_INCOMPLETE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue