Skip to content

Commit

Permalink
Fixed issue #10690: All admin themes show as Sea Green
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Mar 7, 2016
1 parent 514a4cf commit fc78b50
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions application/models/AdminTheme.php
Expand Up @@ -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
Expand All @@ -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',
Expand Down

0 comments on commit fc78b50

Please sign in to comment.