1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-06 22:45:02 +02:00

Merge pull request #5436 from 3D-I/ticket/15863

[ticket/15863] Add core.viewforum_modify_sort_direction
This commit is contained in:
Marc Alexander 2018-11-18 19:36:14 +01:00
commit 3606cce27f
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -598,6 +598,18 @@ else
$sql_start = $start;
}
/**
* Modify the topics sort ordering if needed
*
* @event core.viewforum_modify_sort_direction
* @var string direction Topics sort order
* @since 3.2.5-RC1
*/
$vars = array(
'direction',
);
extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_sort_direction', compact($vars)));
if (is_array($sort_by_sql[$sort_key]))
{
$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;