From 2e8315353e9ab18f3e67d222e6e6e7365512d2e5 Mon Sep 17 00:00:00 2001 From: 3D-I Date: Thu, 1 Nov 2018 04:12:36 +0100 Subject: [ticket/15863] Add core.viewforum_modify_sort_direction PHPBB3-15863 --- phpBB/viewforum.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 416ffe3d90..0d56a5a9c5 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -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; -- cgit v1.2.1