diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 2cf838e93..66b176d0f 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -1393,15 +1393,21 @@ class e107 */ public static function getTheme($themedir='front', $clearCache=false) { - if($themedir === 'front') + + if(!defined('E107_INSTALL')) { - $themedir= self::getPref('sitetheme'); + + if($themedir === 'front') + { + $themedir= self::getPref('sitetheme'); + } + + if($themedir === 'admin') + { + $themedir = self::getPref('admintheme'); + } } - if($themedir === 'admin') - { - $themedir = self::getPref('admintheme'); - } return self::getSingleton('e_theme', true, null, array('themedir'=> $themedir, 'force'=> $clearCache)); } diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index 81d67476f..6a007e8ce 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -448,7 +448,16 @@ class e_theme { if(strstr($line, "CUSTOMPAGES")) { - eval(str_replace("$", "\$", $line)); // detect arrays also. + try + { + @eval(str_replace("$", "\$", $line)); // detect arrays also. + } + catch (ParseError $e) + { + + + } + } } diff --git a/install.php b/install.php index 05633cc87..cf4d163c8 100644 --- a/install.php +++ b/install.php @@ -2121,7 +2121,7 @@ function template_data()