diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-05-11 14:10:19 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-05-11 14:10:19 +0200 |
commit | 197c801746b148e6bcf7b5824e9077c185bf4e5f (patch) | |
tree | 671351344b6fdb01e2a6081a6fef1a1e9ff9c673 /phpBB/phpbb/controller | |
parent | d4fc060bcd61228fdf78da4f2d290a7a17546c46 (diff) | |
download | forums-197c801746b148e6bcf7b5824e9077c185bf4e5f.tar forums-197c801746b148e6bcf7b5824e9077c185bf4e5f.tar.gz forums-197c801746b148e6bcf7b5824e9077c185bf4e5f.tar.bz2 forums-197c801746b148e6bcf7b5824e9077c185bf4e5f.tar.xz forums-197c801746b148e6bcf7b5824e9077c185bf4e5f.zip |
[ticket/12529] Use root_path in controller\resolver to check the template dir
PHPBB3-12529
Diffstat (limited to 'phpBB/phpbb/controller')
-rw-r--r-- | phpBB/phpbb/controller/resolver.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/phpbb/controller/resolver.php b/phpBB/phpbb/controller/resolver.php index 233179e343..f4cebc5730 100644 --- a/phpBB/phpbb/controller/resolver.php +++ b/phpBB/phpbb/controller/resolver.php @@ -38,17 +38,24 @@ class resolver implements ControllerResolverInterface protected $template; /** + * phpBB root path + * @var string + */ + protected $phpbb_root_path; + + /** * Construct method * * @param \phpbb\user $user User Object * @param ContainerInterface $container ContainerInterface object * @param \phpbb\template\template $template */ - public function __construct(\phpbb\user $user, ContainerInterface $container, \phpbb\template\template $template = null) + public function __construct(\phpbb\user $user, $phpbb_root_path, ContainerInterface $container, \phpbb\template\template $template = null) { $this->user = $user; $this->container = $container; $this->template = $template; + $this->phpbb_root_path = $phpbb_root_path; } /** @@ -94,7 +101,7 @@ class resolver implements ControllerResolverInterface { $controller_style_dir = 'ext/' . $controller_dir[0] . '/' . $controller_dir[1] . '/styles'; - if (is_dir($controller_style_dir)) + if (is_dir($this->phpbb_root_path . $controller_style_dir)) { $this->template->set_style(array($controller_style_dir, 'styles')); } |