aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMichael Cullum <unknownbliss@phpbbdevelopers.net>2012-03-15 15:14:01 +0000
committerJoas Schilling <nickvergessen@gmx.de>2012-08-01 10:17:05 +0200
commiteda9bcc65de97b9ffb2c432756907ff0411b281f (patch)
treec111725c2e016a1d78e899f093a916cdd170f5ed /phpBB/includes
parent9877ab1ff36dd66ccc517ffeb00832ff12ee7995 (diff)
downloadforums-eda9bcc65de97b9ffb2c432756907ff0411b281f.tar
forums-eda9bcc65de97b9ffb2c432756907ff0411b281f.tar.gz
forums-eda9bcc65de97b9ffb2c432756907ff0411b281f.tar.bz2
forums-eda9bcc65de97b9ffb2c432756907ff0411b281f.tar.xz
forums-eda9bcc65de97b9ffb2c432756907ff0411b281f.zip
[feature/events] Add core.common_template_vars ledge
Needed by board3portal PHPBB3-9550
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index e5b721b1f5..a16e8d6eeb 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -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.
- $template->assign_vars(array(
+ $template_vars = array(
'SITENAME' => $config['sitename'],
'SITE_DESCRIPTION' => $config['site_desc'],
'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'),
'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');
extract($phpbb_dispatcher->trigger_event('core.page_header', compact($vars)));