[ticket/17305] Change sql_sort to be more in line with previous code

PHPBB3-17305
This commit is contained in:
Marc Alexander 2024-04-21 21:01:22 +02:00
parent 25bd56c254
commit 1c8128292c
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -423,7 +423,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if ($sort_key == 'a')
{
$sort_join = USERS_TABLE . ' u, ';
$sql_sort = ' AND u.user_id = t.topic_last_poster_id ' . $sql_sort;
$sql_sort = ' AND u.user_id = ' . ($show_results == 'posts' ? 'p.poster_id' : 't.topic_last_poster_id ') . $sql_sort;
}
if ($show_results == 'posts')
{