diff options
Diffstat (limited to 'phpBB/includes/functions_content.php')
-rw-r--r-- | phpBB/includes/functions_content.php | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index df25451266..dda752c6ca 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -47,7 +47,7 @@ if (!defined('IN_PHPBB')) */ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, &$sort_dir, &$s_limit_days, &$s_sort_key, &$s_sort_dir, &$u_sort_param, $def_st = false, $def_sk = false, $def_sd = false) { - global $user; + global $user, $phpbb_dispatcher; $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']); @@ -106,6 +106,42 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, $u_sort_param .= ($selected !== $sort_ary['default']) ? ((strlen($u_sort_param)) ? '&' : '') . "{$name}={$selected}" : ''; } + /** + * Run code before generated sort selects are returned + * + * @event core.gen_sort_selects_after + * @var int limit_days Days limit + * @var array sort_by_text Sort by text options + * @var int sort_days Sort by days flag + * @var string sort_key Sort key + * @var string sort_dir Sort dir + * @var string s_limit_days String of days limit + * @var string s_sort_key String of sort key + * @var string s_sort_dir String of sort dir + * @var string u_sort_param Sort URL params + * @var bool def_st Default sort days + * @var bool def_sk Default sort key + * @var bool def_sd Default sort dir + * @var array sorts Sorts + * @since 3.1.9-RC1 + */ + $vars = array( + 'limit_days', + 'sort_by_text', + 'sort_days', + 'sort_key', + 'sort_dir', + 's_limit_days', + 's_sort_key', + 's_sort_dir', + 'u_sort_param', + 'def_st', + 'def_sk', + 'def_sd', + 'sorts', + ); + extract($phpbb_dispatcher->trigger_event('core.gen_sort_selects_after', compact($vars))); + return; } |