Changes to the index file as well.
This commit is contained in:
parent
2e0e8475a1
commit
ea6f853891
14
index.php
14
index.php
@ -107,22 +107,22 @@ try {
|
|||||||
ctx_log_start("Loading themelets");
|
ctx_log_start("Loading themelets");
|
||||||
// load the theme parts
|
// load the theme parts
|
||||||
$_theme = $config->get_string("theme", "default");
|
$_theme = $config->get_string("theme", "default");
|
||||||
if(!file_exists("themes/$_theme")) $_theme = "default";
|
if(!file_exists('themes/'.$_theme)) $_theme = "default";
|
||||||
if(file_exists("themes/$_theme/custompage.class.php")) require_once "themes/$_theme/custompage.class.php";
|
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.'/layout.class.php';
|
||||||
require_once "themes/$_theme/themelet.class.php";
|
require_once 'themes/'.$_theme.'/themelet.class.php';
|
||||||
|
|
||||||
$themelets = glob("ext/*/theme.php");
|
$themelets = glob("ext/*/theme.php");
|
||||||
foreach($themelets as $filename) {
|
foreach($themelets as $filename) {
|
||||||
require_once $filename;
|
require_once $filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
$custom_themelets = glob("themes/$_theme/*.theme.php");
|
$custom_themelets = glob('themes/'.$_theme.'/*.theme.php');
|
||||||
if($custom_themelets) {
|
if($custom_themelets) {
|
||||||
$m = array();
|
$m = array();
|
||||||
foreach($custom_themelets as $filename) {
|
foreach($custom_themelets as $filename) {
|
||||||
if(preg_match("/themes\/$_theme\/(.*)\.theme\.php/",$filename,$m)
|
if(preg_match('/themes\/'.$_theme.'\/(.*)\.theme\.php/',$filename,$m)
|
||||||
&& in_array("ext/{$m[1]}/theme.php", $themelets)) {
|
&& in_array('ext/'.$m[1].'/theme.php', $themelets)) {
|
||||||
require_once $filename;
|
require_once $filename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user