diff options
author | Jakub Senko <jakubsenko@gmail.com> | 2015-09-23 18:07:11 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-02-26 23:10:18 +0100 |
commit | ec70ec96e725696b2efc922ad60e802e58e97c82 (patch) | |
tree | 32812d32e6518d9a4716c05aa8a9dfbeb66ea4fc /phpBB/includes/functions_content.php | |
parent | 6e4ab6509b38f03daa2fb2af30df61423b126bdf (diff) | |
download | forums-ec70ec96e725696b2efc922ad60e802e58e97c82.tar forums-ec70ec96e725696b2efc922ad60e802e58e97c82.tar.gz forums-ec70ec96e725696b2efc922ad60e802e58e97c82.tar.bz2 forums-ec70ec96e725696b2efc922ad60e802e58e97c82.tar.xz forums-ec70ec96e725696b2efc922ad60e802e58e97c82.zip |
[ticket/14189] Add core.gen_sort_selects_after event
PHPBB3-14189
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 6f861b8607..5a22ab24b8 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; } |