@@ -479,17 +479,18 @@ public function getFileLayoutUpdatesXml($area, $package, $theme, $storeId = null
479479 * Add layout files added via theme.xml to layout updates
480480 * for all themes that are parents of this theme.
481481 */
482- public function addFallbackThemesLayoutUpdates (Mage_Core_Model_Config_Element $ updates ) {
482+ public function addFallbackThemesLayoutUpdates (Mage_Core_Model_Config_Element $ updates )
483+ {
483484 /* @var $designPackage Mage_Core_Model_Design_Package */
484485 $ designPackage = Mage::getSingleton ('core/design_package ' );
485486 /* @var $fallback Mage_Core_Model_Design_Fallback */
486487 $ fallback = Mage::getModel ('core/design_fallback ' );
487488
488489 $ fallbacks = $ fallback ->getFallbackScheme ($ designPackage ->getArea (), $ designPackage ->getPackageName (), $ designPackage ->getTheme ('layout ' ));
489490
490- for ($ i= count ($ fallbacks )- 1 ; $ i>= 0 ; $ i --) {
491+ for ($ i = count ($ fallbacks ) - 1 ; $ i >= 0 ; $ i --) {
491492 $ fallback = $ fallbacks [$ i ];
492- if (!isset ($ fallback ['_package ' ]) || ! isset ( $ fallback ['_theme ' ])) {
493+ if (!isset ($ fallback ['_package ' ], $ fallback ['_theme ' ])) {
493494 continue ;
494495 }
495496
@@ -498,14 +499,12 @@ public function addFallbackThemesLayoutUpdates(Mage_Core_Model_Config_Element $u
498499
499500 $ themeUpdateGroups = Mage::getSingleton ('core/design_config ' )->getNode ("{$ designPackage ->getArea ()}/ $ fallbackPackage/ $ fallbackTheme/layout/updates " );
500501
501- if (!$ themeUpdateGroups ) {
502+ if (!$ themeUpdateGroups ) {
502503 continue ;
503504 }
504505
505- foreach ($ themeUpdateGroups as $ themeUpdateGroup ) {
506- $ themeUpdateGroupArray = $ themeUpdateGroup ->asArray ();
507-
508- foreach ($ themeUpdateGroupArray as $ key => $ themeUpdate ) {
506+ foreach ($ themeUpdateGroups as $ themeUpdateGroup ) {
507+ foreach ($ themeUpdateGroup ->asArray () as $ key => $ themeUpdate ) {
509508 $ updateNode = $ updates ->addChild ($ key );
510509 $ updateNode ->addChild ('file ' , $ themeUpdate ['file ' ]);
511510 }
0 commit comments