From fc78b506bb79ac63709373b469c7c7fcad2b9797 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Mon, 7 Mar 2016 12:19:22 +0100 Subject: [PATCH] Fixed issue #10690: All admin themes show as Sea Green --- application/models/AdminTheme.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/models/AdminTheme.php b/application/models/AdminTheme.php index d985bc5ca96..182675830aa 100644 --- a/application/models/AdminTheme.php +++ b/application/models/AdminTheme.php @@ -34,8 +34,9 @@ public function setAdminTheme() // We retrieve the admin theme in config ( {{settings_global}} or config-defaults.php ) $sAdminThemeName = Yii::app()->getConfig('admintheme'); $sAdminTemplateRootDir=Yii::app()->getConfig("styledir"); + // If the template doesn't exist, set to Default - $sAdminThemeName = ($this->isStandardAdminTheme($sAdminThemeName ))?$sAdminThemeName:'default'; + $sAdminThemeName = ($this->isStandardAdminTheme($sAdminThemeName))?$sAdminThemeName:'default'; // If the required admin theme doesn't exist, Sea_Green will be used // TODO : check also for upload directory @@ -50,9 +51,9 @@ public function setAdminTheme() return $this; } - private function isStandardAdminTheme() + private function isStandardAdminTheme($sAdminThemeName) { - return in_array($this->name, + return in_array($sAdminThemeName, array( 'Apple_Blossom', 'Bay_of_Many',