1
0
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:
Marc Alexander
2022-12-26 14:55:23 +01:00
parent 077ceba2a9
commit 60c165c3d0
13 changed files with 20 additions and 43 deletions

View File

@@ -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
*