diff options
author | Nils Adermann <naderman@naderman.de> | 2010-12-13 17:22:05 +0100 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-12-13 17:22:05 +0100 |
commit | 8b9b1f118726e9fb088737129a02e9959ac1adc4 (patch) | |
tree | 55ba94872439793074672323fac87b4710554f61 | |
parent | 18f74a7e10b01f4f6f916e2baa814b27b31fc8a9 (diff) | |
parent | 5e258a0a9021da3f9d830326f697fa05e86be877 (diff) | |
download | forums-8b9b1f118726e9fb088737129a02e9959ac1adc4.tar forums-8b9b1f118726e9fb088737129a02e9959ac1adc4.tar.gz forums-8b9b1f118726e9fb088737129a02e9959ac1adc4.tar.bz2 forums-8b9b1f118726e9fb088737129a02e9959ac1adc4.tar.xz forums-8b9b1f118726e9fb088737129a02e9959ac1adc4.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/9924] Pass template instance into $template->display hook
-rw-r--r-- | phpBB/docs/hook_system.html | 2 | ||||
-rw-r--r-- | phpBB/includes/template.php | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/docs/hook_system.html b/phpBB/docs/hook_system.html index 1bf4630a9f..34055c4661 100644 --- a/phpBB/docs/hook_system.html +++ b/phpBB/docs/hook_system.html @@ -380,6 +380,8 @@ a:active { color: #368AD2; } <code>$template->display($handle, $include_once = true);</code> which is called directly before outputting the (not-yet-compiled) template.<br /> <code>exit_handler();</code> which is called at the very end of phpBB3's execution.</p> +<p>Please note: The <code>$template->display</code> hook takes a third <code>$template</code> argument, which is the template instance being used, which should be used instead of the global.</p> + <p>There are also valid external constants you may want to use if you embed phpBB3 into your application:</p> <div class="codebox"><pre> diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index b009576aee..643a86cde9 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -205,7 +205,7 @@ class template { global $user, $phpbb_hook; - if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once)) + if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once, $this)) { if ($phpbb_hook->hook_return(array(__CLASS__, __FUNCTION__))) { |