Revert "MDL-39871 output: improved block manipulation inheritance"
authorSam Hemelryk <sam@moodle.com>
Wed, 25 Sep 2013 21:12:44 +0000 (09:12 +1200)
committerSam Hemelryk <sam@moodle.com>
Wed, 25 Sep 2013 21:12:44 +0000 (09:12 +1200)
lib/outputlib.php

index 315cb2f..1db20d0 100644 (file)
@@ -329,7 +329,7 @@ class theme_config {
      * This is used when displaying blocks for regions only.
      * @var array
      */
-    public $blockrtlmanipulations = null;
+    public $blockrtlmanipulations = array();
 
     /**
      * @var renderer_factory Instance of the renderer_factory implementation
@@ -488,15 +488,8 @@ class theme_config {
         }
 
         // Use parent theme's "blockrtlmanipulations" if it was defined and if it was not defined on current theme.
-        if (!is_array($this->blockrtlmanipulations)) {
-            $blockrtlmanipulations = array();
-            foreach ($this->parent_configs as $parentconfig) {
-                if (isset($parentconfig->blockrtlmanipulations)) {
-                    $blockrtlmanipulations = $parentconfig->blockrtlmanipulations;
-                    break;
-                }
-            }
-            $this->blockrtlmanipulations = $blockrtlmanipulations;
+        if (empty($this->blockrtlmanipulations) and !empty($parent_config->blockrtlmanipulations)) {
+            $this->blockrtlmanipulations = $parent_config->blockrtlmanipulations;
         }
 
         //fix arrows if needed