diff options
author | LaxSlash <copperhead14228@gmail.com> | 2016-01-07 15:36:10 -0500 |
---|---|---|
committer | LaxSlash <copperhead14228@gmail.com> | 2016-01-07 15:36:10 -0500 |
commit | 8e8fac17ff0cf9e07d5cf4aade37d85a1c767934 (patch) | |
tree | e18d751a7d86a3e3057cea79154243379b09b960 | |
parent | a7058d968ff2e4b4cb4b32fb3f7284bd1a539c93 (diff) | |
download | forums-8e8fac17ff0cf9e07d5cf4aade37d85a1c767934.tar forums-8e8fac17ff0cf9e07d5cf4aade37d85a1c767934.tar.gz forums-8e8fac17ff0cf9e07d5cf4aade37d85a1c767934.tar.bz2 forums-8e8fac17ff0cf9e07d5cf4aade37d85a1c767934.tar.xz forums-8e8fac17ff0cf9e07d5cf4aade37d85a1c767934.zip |
[ticket/14395] Move call to phpbb_add_quickmod_option
Moved the call to function phpbb_add_quickmod_option to being under the core
event core.viewtopic_assign_template_vars_before so as to enable the
modification of elements in the BEFORE they are assigned to the
template, so that removed elements don't show up in a non-functional state.
Allows the user to perform additional permissions checks on the items within the
array.
PHPBB3-14395
-rw-r--r-- | phpBB/viewtopic.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index fcc44abc33..6c762c58bb 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -588,14 +588,6 @@ $quickmod_array = array( 'topic_logs' => array('VIEW_TOPIC_LOGS', $auth->acl_get('m_', $forum_id)), ); -foreach ($quickmod_array as $option => $qm_ary) -{ - if (!empty($qm_ary[1])) - { - phpbb_add_quickmod_option($s_quickmod_action, $option, $qm_ary[0]); - } -} - // Navigation links generate_forum_nav($topic_data); @@ -667,6 +659,14 @@ $vars = array( ); extract($phpbb_dispatcher->trigger_event('core.viewtopic_assign_template_vars_before', compact($vars))); +foreach ($quickmod_array as $option => $qm_ary) +{ + if (!empty($qm_ary[1])) + { + phpbb_add_quickmod_option($s_quickmod_action, $option, $qm_ary[0]); + } +} + $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_posts, $config['posts_per_page'], $start); // Send vars to template |