diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-05-10 04:23:18 -0400 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-11-17 16:39:59 -0500 |
| commit | 1b36fc3a6074a661a1b32c015fb9931f3470c61c (patch) | |
| tree | 58343cd7f3e701742ace297a474c472b27f9a903 /phpBB/includes/template/compile.php | |
| parent | 45a1219886b039fbb4bda740accbfbbdbf971022 (diff) | |
| download | forums-1b36fc3a6074a661a1b32c015fb9931f3470c61c.tar forums-1b36fc3a6074a661a1b32c015fb9931f3470c61c.tar.gz forums-1b36fc3a6074a661a1b32c015fb9931f3470c61c.tar.bz2 forums-1b36fc3a6074a661a1b32c015fb9931f3470c61c.tar.xz forums-1b36fc3a6074a661a1b32c015fb9931f3470c61c.zip | |
[feature/template-events] Handle user access correctly.
Pass through $user from template to filter.
Allow $user to be null for standalone usage of the template engine.
PHPBB3-9550
Diffstat (limited to 'phpBB/includes/template/compile.php')
| -rw-r--r-- | phpBB/includes/template/compile.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/template/compile.php b/phpBB/includes/template/compile.php index 06ff60387a..e2e9a095dc 100644 --- a/phpBB/includes/template/compile.php +++ b/phpBB/includes/template/compile.php @@ -40,8 +40,9 @@ class phpbb_template_compile * @param phpbb_style_resource_locator $locator Resource locator * @param string $phpbb_root_path Path to phpBB root directory * @param phpbb_extension_manager $extension_manager Extension manager to use for finding template fragments in extensions; if null, template hooks will not be invoked + * @param phpbb_user $user Current user */ - public function __construct($allow_php, $template_name, $locator, $phpbb_root_path, $extension_manager = null) + public function __construct($allow_php, $template_name, $locator, $phpbb_root_path, $extension_manager = null, $user = null) { $this->filter_params = array( 'allow_php' => $allow_php, @@ -49,6 +50,7 @@ class phpbb_template_compile 'locator' => $locator, 'phpbb_root_path' => $phpbb_root_path, 'extension_manager' => $extension_manager, + 'user' => $user, 'template_compile' => $this, ); } |
