Skip to content
Browse files

Merge branch 'w30_MDL-34449_m23_layoutmaddness' of git://github.com/s…

…kodak/moodle into MOODLE_23_STABLE
  • Loading branch information...
2 parents 326bbf9 + 1c005cb commit 8e711c3af0ec27bb8de701e883965b82ff6c4571 @nebgor nebgor committed Jul 23, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/pagelib.php
View
6 lib/pagelib.php
@@ -186,7 +186,7 @@ class moodle_page {
* @var array List of theme layout options, these are ignored by core.
* To be used in individual theme layout files only.
*/
- protected $_layout_options = array();
+ protected $_layout_options = null;
/**
* @var string An optional arbitrary parameter that can be set on pages where the context
@@ -496,6 +496,9 @@ protected function magic_get_pagelayout() {
* @return array returns arrys with options for layout file
*/
protected function magic_get_layout_options() {
+ if (!is_array($this->_layout_options)) {
+ $this->_layout_options = $this->_theme->pagelayout_options($this->pagelayout);
+ }
return $this->_layout_options;
}
@@ -1433,7 +1436,6 @@ public function initialise_theme_and_output() {
if (is_null($this->_theme)) {
$themename = $this->resolve_theme();
$this->_theme = theme_config::load($themename);
- $this->_layout_options = $this->_theme->pagelayout_options($this->pagelayout);
}
$this->_theme->setup_blocks($this->pagelayout, $this->blocks);

0 comments on commit 8e711c3

Please sign in to comment.
Something went wrong with that request. Please try again.