From b8e94302bd673f89beb63530bbb7cdfe3ce56da9 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 17 Nov 2009 15:36:02 -0800 Subject: 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". --- modules/gallery/helpers/theme.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php index da57a37e..5a3a328a 100644 --- a/modules/gallery/helpers/theme.php +++ b/modules/gallery/helpers/theme.php @@ -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); -- cgit v1.2.3