mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +00:00
[feature/events] Add core.common_template_vars ledge
Needed by board3portal PHPBB3-9550
This commit is contained in:
parent
9877ab1ff3
commit
eda9bcc65d
1 changed files with 10 additions and 2 deletions
|
@ -4909,7 +4909,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following assigns all _common_ variables that may be used at any point in a template.
|
// The following assigns all _common_ variables that may be used at any point in a template.
|
||||||
$template->assign_vars(array(
|
$template_vars = array(
|
||||||
'SITENAME' => $config['sitename'],
|
'SITENAME' => $config['sitename'],
|
||||||
'SITE_DESCRIPTION' => $config['site_desc'],
|
'SITE_DESCRIPTION' => $config['site_desc'],
|
||||||
'PAGE_TITLE' => $page_title,
|
'PAGE_TITLE' => $page_title,
|
||||||
|
@ -5031,7 +5031,15 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||||
'SITE_LOGO_IMG' => $user->img('site_logo'),
|
'SITE_LOGO_IMG' => $user->img('site_logo'),
|
||||||
|
|
||||||
'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')),
|
'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')),
|
||||||
));
|
);
|
||||||
|
|
||||||
|
$vars = array('template_vars');
|
||||||
|
$event = new phpbb_event_data(compact($vars));
|
||||||
|
$phpbb_dispatcher->dispatch('core.common_template_vars', $event);
|
||||||
|
extract($event->get_data_filtered($vars));
|
||||||
|
|
||||||
|
$template->assign_vars($template_vars);
|
||||||
|
|
||||||
|
|
||||||
$vars = array('page_title', 'display_online_list', 'item_id', 'item');
|
$vars = array('page_title', 'display_online_list', 'item_id', 'item');
|
||||||
extract($phpbb_dispatcher->trigger_event('core.page_header', compact($vars)));
|
extract($phpbb_dispatcher->trigger_event('core.page_header', compact($vars)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue