diff options
Diffstat (limited to 'core/libraries/Theme_View.php')
-rw-r--r-- | core/libraries/Theme_View.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/libraries/Theme_View.php b/core/libraries/Theme_View.php index 84d86b0b..cce315ff 100644 --- a/core/libraries/Theme_View.php +++ b/core/libraries/Theme_View.php @@ -30,6 +30,12 @@ class Theme_View_Core extends View { * @return void */ public function __construct($name, $page_type) { + $theme_name = module::get_var("core", "active_site_theme"); + if (!file_exists("themes/$theme_name")) { + module::set_var("core", "active_site_theme", "default"); + theme::load_themes(); + Kohana::log("error", "Unable to locate theme '$theme_name', switching to default theme."); + } parent::__construct($name); $this->theme_name = module::get_var("core", "active_site_theme"); |