Improved exception handling and other minor fixes

This commit is contained in:
Deon George
2013-05-10 00:42:54 +10:00
parent d1c0d48250
commit 077c1923f3
11 changed files with 45 additions and 75 deletions

View File

@@ -172,10 +172,7 @@ class Config extends Kohana_Config {
public static function theme() {
// If we are using user admin pages (and login), we'll choose the admin theme.
if (Request::current() AND (! empty(URL::$method_directory[strtolower(Request::current()->directory())]) OR in_array(strtolower(Request::current()->controller()),array('login'))))
return 'theme/'.Kohana::$config->load('config')->theme_admin;
else
return 'theme/'.Kohana::$config->load('config')->theme;
return URL::admin_url() ? 'theme/'.Kohana::$config->load('config')->theme_admin : 'theme/'.Kohana::$config->load('config')->theme;
}
public static function time($date) {