Permalink
Browse files

blocks-navigation MDL-25596 Fixed notice when block config doesn't al…

…ready exist
  • Loading branch information...
1 parent 8e5c23e commit 0022a97f244e0c1b7f95172fa92de938984d96a6 Sam Hemelryk committed Jan 12, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 blocks/navigation/block_navigation.php
@@ -107,12 +107,16 @@ function get_required_javascript() {
if (!empty($CFG->navcourselimit)) {
$limit = $CFG->navcourselimit;
}
+ $expansionlimit = 0;
+ if (!empty($this->config->expansionlimit)) {
+ $expansionlimit = $this->config->expansionlimit;
+ }
$arguments = array(
'id' => $this->instance->id,
'instance' => $this->instance->id,
'candock' => $this->instance_can_be_docked(),
'courselimit' => $limit,
- 'expansionlimit' => $this->config->expansionlimit
+ 'expansionlimit' => $expansionlimit
);
$this->page->requires->yui_module(array('core_dock', 'moodle-block_navigation-navigation'), 'M.block_navigation.init_add_tree', array($arguments));
}

0 comments on commit 0022a97

Please sign in to comment.