Move the theme fallback checking into theme::load_themes() so that

we're calling it once per request.
This commit is contained in:
Bharat Mediratta
2009-11-27 17:12:13 -08:00
parent ce183e5a69
commit 22149b52c3
3 changed files with 13 additions and 16 deletions
-6
View File
@@ -27,12 +27,6 @@ class Admin_View_Core extends Gallery_View {
* @return void
*/
public function __construct($name) {
$theme_name = module::get_var("gallery", "active_admin_theme");
if (!file_exists(THEMEPATH . $theme_name)) {
module::set_var("gallery", "active_admin_theme", "admin_wind");
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("gallery", "active_admin_theme");