From c90734f0898f6e067142e8d0b8cd82e829b8fdaa Mon Sep 17 00:00:00 2001 From: Alexander Menk Date: Tue, 7 May 2013 17:40:43 +0200 Subject: [PATCH] Changed package to community --- .../local/Aoe/DesignFallback/Helper/Data.php | 5 -- .../DesignFallback/Model/Design/Package.php | 89 ------------------- .../local/Aoe/DesignFallback/etc/config.xml | 47 ---------- .../local/Aoe/DesignFallback/etc/system.xml | 38 -------- app/etc/modules/Aoe_DesignFallback.xml | 9 -- modman | 2 +- 6 files changed, 1 insertion(+), 189 deletions(-) delete mode 100644 app/code/local/Aoe/DesignFallback/Helper/Data.php delete mode 100644 app/code/local/Aoe/DesignFallback/Model/Design/Package.php delete mode 100644 app/code/local/Aoe/DesignFallback/etc/config.xml delete mode 100644 app/code/local/Aoe/DesignFallback/etc/system.xml delete mode 100644 app/etc/modules/Aoe_DesignFallback.xml diff --git a/app/code/local/Aoe/DesignFallback/Helper/Data.php b/app/code/local/Aoe/DesignFallback/Helper/Data.php deleted file mode 100644 index 8955c00..0000000 --- a/app/code/local/Aoe/DesignFallback/Helper/Data.php +++ /dev/null @@ -1,5 +0,0 @@ -getFallbackScheme($params)); - } - - /** - * Get fallback scheme from configuration - * - * @param array $defaults (optional). Needed for resolving default package and theme for duplicates eliminiation - * @return array - */ - protected function getFallbackScheme(array $defaults=array()) { - $configuration = Mage::getStoreConfig('design/fallback/fallback', $this->getStore()); - $fallbackScheme = array(); - foreach (explode("\n", $configuration) as $line) { - if (strpos($line, ':') === false) { - Mage::throwException('Line must contain package and theme separated by ":"'); - } - list($packageName, $themeName) = explode(':', $line); - - $packageName = $this->resolveConfiguration($packageName); - if (!empty($packageName)) { // empty values will be evaluated to current package ... - if (!$this->designPackageExists($packageName, $this->getArea())) { - // Mage::log(sprintf('Could not find package "%s". Using "%s" instead.', $packageName, Mage_Core_Model_Design_Package::DEFAULT_PACKAGE)); - $packageName = Mage_Core_Model_Design_Package::DEFAULT_PACKAGE; - } - } else { - $packageName = $defaults['_package']; - } - - $themeName = $this->resolveConfiguration($themeName); - if (empty($themeName)) { - $themeName = $defaults['_theme']; - } - - $params = array( - '_package' => $packageName, - '_theme' => $themeName, - ); - - // avoid exact duplicates that are neighbours - if ($params !== end($fallbackScheme)) { - $fallbackScheme[] = $params; - } - } - - /* - $debug = array(); - foreach ($fallbackScheme as $level) { $debug[] = implode('/', $level); } - Mage::log($debug); - */ - - return $fallbackScheme; - } - - /** - * Resolve configuration. - * Values wrapped in {...} will be looked up in configuration. - * Example: {design/package/name} - * - * @param $value - * @return string - */ - protected function resolveConfiguration($value) { - $value = trim($value); - if (strtolower($value == '[current]')) { - // empty value will be in ->updateParamDefaults(). - // to the current package and theme taking type-specific themes and design changed (System -> Design) into account - $value = NULL; - } elseif ($value[0] == '{' && $value[strlen($value)-1] == '}') { - $value = substr($value, 1, -1); - $value = Mage::getStoreConfig($value, $this->getStore()); - } - return $value; - } - -} diff --git a/app/code/local/Aoe/DesignFallback/etc/config.xml b/app/code/local/Aoe/DesignFallback/etc/config.xml deleted file mode 100644 index 7354da2..0000000 --- a/app/code/local/Aoe/DesignFallback/etc/config.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - 0.2.1 - - - - - - - Aoe_DesignFallback_Helper - - - - - Aoe_DesignFallback_Model - - - - Aoe_DesignFallback_Model_Design_Package - - - - - - - - - - aoe_designfallback/aoe_designfallback.xml - - - - - - - - - - - - - - diff --git a/app/code/local/Aoe/DesignFallback/etc/system.xml b/app/code/local/Aoe/DesignFallback/etc/system.xml deleted file mode 100644 index 74232e6..0000000 --- a/app/code/local/Aoe/DesignFallback/etc/system.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - text - 0 - 1 - 1 - 1 - - - - textarea - 1 - 1 - 1 - 1 - Instructions:
-Insert one line per fallback level.
-Separate package name from theme name by a ":".
-Use {path/to/configuration} for variables that will be replaced by their configured value.
-Use [current] for using the package or theme that is currently set. In contrast to using {design/package/name} and {design/theme/default} this takes type-specific themes and design changes (System > Design) into account.
-First line has highest priority.

-Magento's default behaviour is reflected by:
-[current]:[current]
-[current]:default
-base:default]]>
-
-
-
-
-
-
-
diff --git a/app/etc/modules/Aoe_DesignFallback.xml b/app/etc/modules/Aoe_DesignFallback.xml deleted file mode 100644 index 5948670..0000000 --- a/app/etc/modules/Aoe_DesignFallback.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - local - true - - - diff --git a/modman b/modman index d2cd560..a2d3b14 100644 --- a/modman +++ b/modman @@ -1,2 +1,2 @@ app/etc/modules/* app/etc/modules/ -app/code/local/Aoe/DesignFallback app/code/local/Aoe/DesignFallback +app/code/community/Aoe/DesignFallback app/code/community/Aoe/DesignFallback