aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Template.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Template.class.php')
-rw-r--r--inc/poche/Template.class.php6
1 files changed, 3 insertions, 3 deletions
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
24 24
25 $themeDirectory = (is_null($pocheUser) ? DEFAULT_THEME : $pocheUser->getConfigValue('theme')); 25 $themeDirectory = (is_null($pocheUser) ? DEFAULT_THEME : $pocheUser->getConfigValue('theme'));
26 26
27 if ($themeDirectory === false) { 27 if ($themeDirectory === false || !is_dir(THEME . '/' . $themeDirectory)) {
28 $themeDirectory = DEFAULT_THEME; 28 $themeDirectory = DEFAULT_THEME;
29 } 29 }
30 30
@@ -181,7 +181,7 @@ class Template extends Twig_Environment
181 while (($theme = readdir($handle)) !== false) { 181 while (($theme = readdir($handle)) !== false) {
182 # Themes are stored in a directory, so all directory names are themes 182 # Themes are stored in a directory, so all directory names are themes
183 # @todo move theme installation data to database 183 # @todo move theme installation data to database
184 if (!is_dir(THEME . '/' . $theme) || in_array($theme, array('.', '..'))) { 184 if (!is_dir(THEME . '/' . $theme) || in_array($theme, array('.', '..', '_global'))) {
185 continue; 185 continue;
186 } 186 }
187 187
@@ -232,4 +232,4 @@ class Template extends Twig_Environment
232 Tools::emptyCache(); 232 Tools::emptyCache();
233 Tools::redirect('?view=config'); 233 Tools::redirect('?view=config');
234 } 234 }
235} \ No newline at end of file 235}