Changes to the index file as well.
This commit is contained in:
parent
2e0e8475a1
commit
ea6f853891
1 changed files with 7 additions and 7 deletions
14
index.php
14
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;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue