Skip to content
Browse files

Merge branch 'MDL-41595_M24' of git://github.com/lazydaisy/moodle int…

…o MOODLE_24_STABLE
  • Loading branch information...
2 parents 1d5c188 + 0f85e6b commit 657beb8924267cb2202ba78bec8d49b55970a744 @stronk7 stronk7 committed Sep 17, 2013
Showing with 3 additions and 4 deletions.
  1. +3 −4 mod/book/locallib.php
View
7 mod/book/locallib.php
@@ -151,7 +151,7 @@ function book_get_chapter_title($chid, $chapters, $book, $context) {
}
/**
- * Add the book TOC sticky block to the 1st region available
+ * Add the book TOC sticky block to the default region
*
* @param array $chapters
* @param stdClass $chapter
@@ -169,9 +169,8 @@ function book_add_fake_block($chapters, $chapter, $book, $cm, $edit) {
$bc->attributes['class'] = 'block block_book_toc';
$bc->content = $toc;
- $regions = $PAGE->blocks->get_regions();
- $firstregion = reset($regions);
- $PAGE->blocks->add_fake_block($bc, $firstregion);
+ $defaultregion = $PAGE->blocks->get_default_region();
+ $PAGE->blocks->add_fake_block($bc, $defaultregion);
}
/**

0 comments on commit 657beb8

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