diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-06-26 11:57:18 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-06-26 11:57:18 -0700 |
commit | 87d09bcd2e7d76282611d21a2a410c8ba5dad9df (patch) | |
tree | f39849822441e5d0bab0462176942c320e75d277 | |
parent | 8bc7eec60f8be5219bed64d95cf7e6efb85941f1 (diff) | |
parent | 8ecf28d3efa258d790d6cb31947407deb7149797 (diff) |
Merge branch 'master' of github.com:gallery/gallery3
-rw-r--r-- | modules/gallery/helpers/theme.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php index a390645f..419d986f 100644 --- a/modules/gallery/helpers/theme.php +++ b/modules/gallery/helpers/theme.php @@ -53,6 +53,15 @@ class theme_Core { 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; + array_unshift($modules, THEMEPATH . self::$admin_theme_name); + } else { + Kohana_Log::add("error", "Missing override theme: '$override'"); + } + } } else { // Admins can override the site theme, temporarily. This lets us preview themes. if (identity::active_user()->admin && $override = $input->get("theme")) { |