mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[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
This commit is contained in:
parent
a7058d968f
commit
8e8fac17ff
1 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue