[ticket/15863] Add core.viewforum_modify_sort_direction

PHPBB3-15863
This commit is contained in:
3D-I 2018-11-01 04:12:36 +01:00 committed by Marc Alexander
parent 97912d74e2
commit 2e8315353e
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;