mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 03:34:04 +02:00
[ticket/10933] Add mutators for template_path to style resource locator.
template_path is now private. Change semantics of passing false for template path - now this resets template path to default which I think makes sense. PHPBB3-10933
This commit is contained in:
@@ -44,7 +44,7 @@ class phpbb_style_resource_locator implements phpbb_template_locator
|
||||
* style directory, such as admin control panel templates.
|
||||
* @var string
|
||||
*/
|
||||
public $template_path = 'template/';
|
||||
private $template_path;
|
||||
|
||||
/**
|
||||
* Map from root index to handles to source template file paths.
|
||||
@@ -63,6 +63,11 @@ class phpbb_style_resource_locator implements phpbb_template_locator
|
||||
*/
|
||||
private $filenames = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->set_default_template_path();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the list of style paths
|
||||
*
|
||||
@@ -93,6 +98,19 @@ class phpbb_style_resource_locator implements phpbb_template_locator
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the location of templates directory within style directories.
|
||||
*/
|
||||
public function set_template_path($template_path)
|
||||
{
|
||||
$this->template_path = $template_path;
|
||||
}
|
||||
|
||||
public function set_default_template_path()
|
||||
{
|
||||
$this->template_path = 'template/';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user