Tweak load_themes() to match exactly "/admin" or the "/admin/" prefix,

but not just the "/admin" prefix because that breaks if you add an
image like "admin_photostream".
This commit is contained in:
Bharat Mediratta
2009-11-17 15:36:02 -08:00
parent 1067e68292
commit b8e94302bd
+2 -1
View File
@@ -38,7 +38,8 @@ class theme_Core {
if (!(identity::active_user()->admin && $theme_name = $input->get("theme"))) {
$theme_name = module::get_var(
"gallery",
!strncmp($path, "/admin", 6) ? "active_admin_theme" : "active_site_theme");
$path == "/admin" || !strncmp($path, "/admin/", 7) ?
"active_admin_theme" : "active_site_theme");
}
$modules = Kohana::config("core.modules");
array_unshift($modules, THEMEPATH . $theme_name);