mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 03:04:09 +02:00
[ticket/11628] Remove phpbb_style (move methods to phpbb_template)
PHPBB3-11628
This commit is contained in:
@@ -38,23 +38,23 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
* phpbb_style object
|
||||
* @var phpbb_style
|
||||
* phpbb_template object
|
||||
* @var phpbb_template
|
||||
*/
|
||||
protected $style;
|
||||
protected $template;
|
||||
|
||||
/**
|
||||
* Construct method
|
||||
*
|
||||
* @param phpbb_user $user User Object
|
||||
* @param ContainerInterface $container ContainerInterface object
|
||||
* @param phpbb_style $style
|
||||
* @param phpbb_template_interface $template
|
||||
*/
|
||||
public function __construct(phpbb_user $user, ContainerInterface $container, phpbb_style $style = null)
|
||||
public function __construct(phpbb_user $user, ContainerInterface $container, phpbb_template $template = null)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->container = $container;
|
||||
$this->style = $style;
|
||||
$this->template = $template;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,13 +96,13 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||
$controller_dir = explode('_', get_class($controller_object));
|
||||
|
||||
// 0 phpbb, 1 ext, 2 vendor, 3 extension name, ...
|
||||
if (!is_null($this->style) && isset($controller_dir[3]) && $controller_dir[1] === 'ext')
|
||||
if (!is_null($this->template) && isset($controller_dir[3]) && $controller_dir[1] === 'ext')
|
||||
{
|
||||
$controller_style_dir = 'ext/' . $controller_dir[2] . '/' . $controller_dir[3] . '/styles';
|
||||
|
||||
if (is_dir($controller_style_dir))
|
||||
{
|
||||
$this->style->set_style(array($controller_style_dir, 'styles'));
|
||||
$this->template->set_style(array($controller_style_dir, 'styles'));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user