X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=inc%2Fpoche%2FTemplate.class.php;h=4d0bfdbb13161c4a6c8b3a625bfd58bbfa1bd157;hb=f3052b454277b2d54669943f7c0ca5d4b4af50ab;hp=b686f2ec783037553db3af677606b46a6256c215;hpb=44d35257e805856b4913c63fcbed3c0acb64bae8;p=github%2Fwallabag%2Fwallabag.git diff --git a/inc/poche/Template.class.php b/inc/poche/Template.class.php index b686f2ec..4d0bfdbb 100644 --- a/inc/poche/Template.class.php +++ b/inc/poche/Template.class.php @@ -24,7 +24,7 @@ class Template extends Twig_Environment $themeDirectory = (is_null($pocheUser) ? DEFAULT_THEME : $pocheUser->getConfigValue('theme')); - if ($themeDirectory === false) { + if ($themeDirectory === false || !is_dir(THEME . '/' . $themeDirectory)) { $themeDirectory = DEFAULT_THEME; } @@ -181,7 +181,7 @@ class Template extends Twig_Environment while (($theme = readdir($handle)) !== false) { # Themes are stored in a directory, so all directory names are themes # @todo move theme installation data to database - if (!is_dir(THEME . '/' . $theme) || in_array($theme, array('.', '..'))) { + if (!is_dir(THEME . '/' . $theme) || in_array($theme, array('.', '..', '_global'))) { continue; } @@ -232,4 +232,4 @@ class Template extends Twig_Environment Tools::emptyCache(); Tools::redirect('?view=config'); } -} \ No newline at end of file +}