diff --git a/index.php b/index.php index 41e28b47..fb939ed1 100644 --- a/index.php +++ b/index.php @@ -107,22 +107,22 @@ try { ctx_log_start("Loading themelets"); // load the theme parts $_theme = $config->get_string("theme", "default"); - if(!file_exists("themes/$_theme")) $_theme = "default"; - if(file_exists("themes/$_theme/custompage.class.php")) require_once "themes/$_theme/custompage.class.php"; - require_once "themes/$_theme/layout.class.php"; - require_once "themes/$_theme/themelet.class.php"; + if(!file_exists('themes/'.$_theme)) $_theme = "default"; + if(file_exists('themes/'.$_theme.'/custompage.class.php')) require_once 'themes/'.$_theme.'/custompage.class.php'; + require_once 'themes/'.$_theme.'/layout.class.php'; + require_once 'themes/'.$_theme.'/themelet.class.php'; $themelets = glob("ext/*/theme.php"); foreach($themelets as $filename) { require_once $filename; } - $custom_themelets = glob("themes/$_theme/*.theme.php"); + $custom_themelets = glob('themes/'.$_theme.'/*.theme.php'); if($custom_themelets) { $m = array(); foreach($custom_themelets as $filename) { - if(preg_match("/themes\/$_theme\/(.*)\.theme\.php/",$filename,$m) - && in_array("ext/{$m[1]}/theme.php", $themelets)) { + if(preg_match('/themes\/'.$_theme.'\/(.*)\.theme\.php/',$filename,$m) + && in_array('ext/'.$m[1].'/theme.php', $themelets)) { require_once $filename; } }