1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 08:17:47 +02:00

[ticket/17333] Suggested code improvements

PHPBB-17333

Signed-off-by: Matt Friedman <maf675@gmail.com>
This commit is contained in:
Matt Friedman
2024-06-06 19:37:36 -07:00
parent 36527a97b8
commit ca918f893e
7 changed files with 15 additions and 17 deletions

View File

@@ -3874,8 +3874,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
}
// Assign web push template vars globally (if not done already by ucp_notifications) for the dropdown subscribe button
if ($config['webpush_enable']
&& $config['webpush_dropdown_subscribe']
if ($config['webpush_enable'] && $config['webpush_dropdown_subscribe']
&& $template->retrieve_var('NOTIFICATIONS_WEBPUSH_ENABLE') === null)
{
$methods = $phpbb_notifications->get_subscription_methods();
@@ -3883,9 +3882,8 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
if ($webpush)
{
$formHelper = $phpbb_container->get('form_helper');
$template_ary = $webpush['method']->get_ucp_template_data($controller_helper, $formHelper);
$template->assign_vars($template_ary);
$form_helper = $phpbb_container->get('form_helper');
$template->assign_vars($webpush['method']->get_ucp_template_data($controller_helper, $form_helper));
}
}
}