MDL-39871 output: improved block manipulation inheritance

This commit is contained in:
Sam Hemelryk
2013-09-24 10:37:14 +12:00
parent 0fd451b7ad
commit eeb08203dc
+10 -3
View File
@@ -329,7 +329,7 @@ class theme_config {
* This is used when displaying blocks for regions only.
* @var array
*/
public $blockrtlmanipulations = array();
public $blockrtlmanipulations = null;
/**
* @var renderer_factory Instance of the renderer_factory implementation
@@ -488,8 +488,15 @@ class theme_config {
}
// Use parent theme's "blockrtlmanipulations" if it was defined and if it was not defined on current theme.
if (empty($this->blockrtlmanipulations) and !empty($parent_config->blockrtlmanipulations)) {
$this->blockrtlmanipulations = $parent_config->blockrtlmanipulations;
if (!is_array($this->blockrtlmanipulations)) {
$blockrtlmanipulations = array();
foreach ($this->parent_configs as $parentconfig) {
if (isset($parentconfig->blockrtlmanipulations)) {
$blockrtlmanipulations = $parentconfig->blockrtlmanipulations;
break;
}
}
$this->blockrtlmanipulations = $blockrtlmanipulations;
}
//fix arrows if needed