Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix an issue where a preview of the admin view would not work.

  • Loading branch information...
commit e380f19ee29ee1f524aee2d4ebbf4c49f120fb19 1 parent d66c496
@talmdal talmdal authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 modules/gallery/helpers/theme.php
View
9 modules/gallery/helpers/theme.php
@@ -53,6 +53,15 @@ static function load_themes() {
if (file_exists(THEMEPATH . self::$site_theme_name . "/admin")) {
array_unshift($modules, THEMEPATH . self::$site_theme_name . "/admin");
}
+ // Admins can override the site theme, temporarily. This lets us preview themes.
+ if (identity::active_user()->admin && $override = $input->get("theme")) {
+ if (file_exists(THEMEPATH . $override)) {
+ self::$admin_theme_name = $override;
+ } else {
+ Kohana_Log::add("error", "Missing override theme: '$override'");
+ }
+ }
+ array_unshift($modules, THEMEPATH . self::$admin_theme_name);
} else {
// Admins can override the site theme, temporarily. This lets us preview themes.
if (identity::active_user()->admin && $override = $input->get("theme")) {
Please sign in to comment.
Something went wrong with that request. Please try again.