@@ -479,17 +479,18 @@ public function getFileLayoutUpdatesXml($area, $package, $theme, $storeId = null
479
479
* Add layout files added via theme.xml to layout updates
480
480
* for all themes that are parents of this theme.
481
481
*/
482
- public function addFallbackThemesLayoutUpdates (Mage_Core_Model_Config_Element $ updates ) {
482
+ public function addFallbackThemesLayoutUpdates (Mage_Core_Model_Config_Element $ updates )
483
+ {
483
484
/* @var $designPackage Mage_Core_Model_Design_Package */
484
485
$ designPackage = Mage::getSingleton ('core/design_package ' );
485
486
/* @var $fallback Mage_Core_Model_Design_Fallback */
486
487
$ fallback = Mage::getModel ('core/design_fallback ' );
487
488
488
489
$ fallbacks = $ fallback ->getFallbackScheme ($ designPackage ->getArea (), $ designPackage ->getPackageName (), $ designPackage ->getTheme ('layout ' ));
489
490
490
- for ($ i= count ($ fallbacks )- 1 ; $ i>= 0 ; $ i --) {
491
+ for ($ i = count ($ fallbacks ) - 1 ; $ i >= 0 ; $ i --) {
491
492
$ fallback = $ fallbacks [$ i ];
492
- if (!isset ($ fallback ['_package ' ]) || ! isset ( $ fallback ['_theme ' ])) {
493
+ if (!isset ($ fallback ['_package ' ], $ fallback ['_theme ' ])) {
493
494
continue ;
494
495
}
495
496
@@ -498,14 +499,12 @@ public function addFallbackThemesLayoutUpdates(Mage_Core_Model_Config_Element $u
498
499
499
500
$ themeUpdateGroups = Mage::getSingleton ('core/design_config ' )->getNode ("{$ designPackage ->getArea ()}/ $ fallbackPackage/ $ fallbackTheme/layout/updates " );
500
501
501
- if (!$ themeUpdateGroups ) {
502
+ if (!$ themeUpdateGroups ) {
502
503
continue ;
503
504
}
504
505
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 ) {
509
508
$ updateNode = $ updates ->addChild ($ key );
510
509
$ updateNode ->addChild ('file ' , $ themeUpdate ['file ' ]);
511
510
}
0 commit comments