$x_theme = forge_get_config('default_theme');
}
require_once forge_get_config('themes_root').'/'.$x_theme.'/Theme.class.php';
- $HTML = new Theme () ;
+ $x = explode('-', $x_theme);
+ $y = array('Theme');
+ foreach ($x as $i) {
+ $y[] = ucfirst($i);
+ }
+ $classname = implode('_', $y);
+ if (!class_exists($classname)) {
+ $classname = 'Theme'; // Cope with local themes where the class may still be called "Theme"
+ }
+ $HTML = new $classname () ;
$HTML->_theme = $x_theme;
unset($x_theme);
} else { // Script run from cron or a command line