mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-15 05:04:09 +02:00
[ticket/16955] Clean up storage and template classes
PHPBB3-16955
This commit is contained in:
@@ -92,27 +92,14 @@ class twig extends \phpbb\template\base
|
||||
}
|
||||
|
||||
// Add admin namespace
|
||||
if ($this->path_helper->get_adm_relative_path() !== null && is_dir($this->phpbb_root_path . $this->path_helper->get_adm_relative_path() . 'style/'))
|
||||
if ($this->path_helper->get_adm_relative_path() !== null
|
||||
&& is_dir($this->phpbb_root_path . $this->path_helper->get_adm_relative_path() . 'style/')
|
||||
&& $this->loader instanceof \Twig\Loader\FilesystemLoader)
|
||||
{
|
||||
$this->loader->setPaths($this->phpbb_root_path . $this->path_helper->get_adm_relative_path() . 'style/', 'admin');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the cache
|
||||
*
|
||||
* @return \phpbb\template\template
|
||||
*/
|
||||
public function clear_cache()
|
||||
{
|
||||
if (is_dir($this->cachepath))
|
||||
{
|
||||
$this->twig->clearCacheFiles();
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the style tree of the style preferred by the current user
|
||||
*
|
||||
|
Reference in New Issue
Block a user