diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 4f2331e38..499c6b104 100755 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -1065,10 +1065,10 @@ class G $configurationFile = G::ExpandPath( "skinEngine" ).'base'.PATH_SEP.'config.xml'; } else { - $configurationFile = G::ExpandPath( "skinEngine" ) . $skinName . PATH_SEP . 'config.xml'; + $configurationFile = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml'; if (!is_file($configurationFile)) { - $configurationFile = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml'; + $configurationFile = G::ExpandPath( "skinEngine" ) . $skinName . PATH_SEP . 'config.xml'; } } diff --git a/workflow/engine/skinEngine/skinEngine.php b/workflow/engine/skinEngine/skinEngine.php index e615133c3..703efc693 100755 --- a/workflow/engine/skinEngine/skinEngine.php +++ b/workflow/engine/skinEngine/skinEngine.php @@ -93,12 +93,12 @@ class SkinEngine //Based on requested Skin look if there is any registered with that name if (strtolower($this->mainSkin) != "classic") { - if (is_dir($this->skinsBasePath . $this->mainSkin)) { // check this skin on core skins path - $skinObject = $this->skinsBasePath . $this->mainSkin; - } - else if (defined('PATH_CUSTOM_SKINS') && is_dir(PATH_CUSTOM_SKINS . $this->mainSkin)) { // check this skin on user skins path + if (defined('PATH_CUSTOM_SKINS') && is_dir(PATH_CUSTOM_SKINS . $this->mainSkin)) { // check this skin on user skins path $skinObject = PATH_CUSTOM_SKINS . $this->mainSkin; } + else if (is_dir($this->skinsBasePath . $this->mainSkin)) { // check this skin on core skins path + $skinObject = $this->skinsBasePath . $this->mainSkin; + } else { //Skin doesn't exist $this->mainSkin = "classic"; }