|
|
@@ -9,11 +9,13 @@ class Theme {
|
|
|
DBG::log($_theme, 'array', "Theme::getInstance()...");
|
|
|
if (null !== $_theme) return $_theme;
|
|
|
try {
|
|
|
- $themeName = ''; // TODO: read from config - theme
|
|
|
- // $themeName = 'Bocian'; // TODO: DBG
|
|
|
- DBG::log("Theme::getInstance({$themeName})");
|
|
|
- $clsName = ($themeName) ? "Theme_{$themeName}" : "ThemeDefault";
|
|
|
- Lib::loadClass($clsName);
|
|
|
+ $clsName = "ThemeDefault";
|
|
|
+ if ($activeProjectName = Config::getProjectName()) {
|
|
|
+ $activeProjectPath = Config::getProjectPath();
|
|
|
+ $clsName = "Theme_{$activeProjectName}";
|
|
|
+ require_once "{$activeProjectPath}/theme/{$activeProjectName}.php";
|
|
|
+ }
|
|
|
+ DBG::log("Theme::getInstance() '{$clsName}'");
|
|
|
$_theme = new $clsName();
|
|
|
} catch (Exception $e) {
|
|
|
DBG::log($e);
|