diff options
Diffstat (limited to 'phpBB/phpbb/controller')
-rw-r--r-- | phpBB/phpbb/controller/exception.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/controller/helper.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/controller/provider.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/controller/resolver.php | 29 |
4 files changed, 41 insertions, 21 deletions
diff --git a/phpBB/phpbb/controller/exception.php b/phpBB/phpbb/controller/exception.php index 06ece8d1d5..437558b06a 100644 --- a/phpBB/phpbb/controller/exception.php +++ b/phpBB/phpbb/controller/exception.php @@ -1,9 +1,13 @@ <?php /** * -* @package controller -* @copyright (c) 2012 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -11,7 +15,6 @@ namespace phpbb\controller; /** * Controller exception class -* @package phpBB3 */ class exception extends \RuntimeException { diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index 959a24f277..7b232294f0 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -1,9 +1,13 @@ <?php /** * -* @package controller -* @copyright (c) 2012 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -15,7 +19,6 @@ use Symfony\Component\Routing\RequestContext; /** * Controller helper class, contains methods that do things for controllers -* @package phpBB3 */ class helper { diff --git a/phpBB/phpbb/controller/provider.php b/phpBB/phpbb/controller/provider.php index a32ce1473b..91f3a07fb1 100644 --- a/phpBB/phpbb/controller/provider.php +++ b/phpBB/phpbb/controller/provider.php @@ -1,9 +1,13 @@ <?php /** * -* @package controller -* @copyright (c) 2012 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -15,7 +19,6 @@ use Symfony\Component\Config\FileLocator; /** * Controller interface -* @package phpBB3 */ class provider { diff --git a/phpBB/phpbb/controller/resolver.php b/phpBB/phpbb/controller/resolver.php index 233179e343..77532767fc 100644 --- a/phpBB/phpbb/controller/resolver.php +++ b/phpBB/phpbb/controller/resolver.php @@ -1,9 +1,13 @@ <?php /** * -* @package controller -* @copyright (c) 2012 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -15,7 +19,6 @@ use Symfony\Component\HttpFoundation\Request; /** * Controller manager class -* @package phpBB3 */ class resolver implements ControllerResolverInterface { @@ -33,28 +36,36 @@ class resolver implements ControllerResolverInterface /** * phpbb\template\template object - * @var phpbb\template\template + * @var \phpbb\template\template */ 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 string $phpbb_root_path Relative path to phpBB root * @param \phpbb\template\template $template */ - public function __construct(\phpbb\user $user, ContainerInterface $container, \phpbb\template\template $template = null) + public function __construct(\phpbb\user $user, ContainerInterface $container, $phpbb_root_path, \phpbb\template\template $template = null) { $this->user = $user; $this->container = $container; $this->template = $template; + $this->phpbb_root_path = $phpbb_root_path; } /** * Load a controller callable * - * @param Symfony\Component\HttpFoundation\Request $request Symfony Request object + * @param \Symfony\Component\HttpFoundation\Request $request Symfony Request object * @return bool|Callable Callable or false * @throws \phpbb\controller\exception */ @@ -94,7 +105,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')); } @@ -109,7 +120,7 @@ class resolver implements ControllerResolverInterface * and should match the parameters of the method you are using as your * controller. * - * @param Symfony\Component\HttpFoundation\Request $request Symfony Request object + * @param \Symfony\Component\HttpFoundation\Request $request Symfony Request object * @param mixed $controller A callable (controller class, method) * @return bool False * @throws \phpbb\controller\exception |