Merge branch 'wip-mdl-32218' of git://github.com/rajeshtaneja/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 16 Oct 2012 06:35:28 +0000 (14:35 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 16 Oct 2012 06:35:28 +0000 (14:35 +0800)
lib/blocklib.php

index 66773d2..9b8d679 100644 (file)
@@ -454,7 +454,9 @@ class block_manager {
      * @return bool True if all of the blocks within that region are docked
      */
     public function region_completely_docked($region, $output) {
-        if (!$this->page->theme->enable_dock) {
+        global $CFG;
+        // If theme doesn't allow docking or allowblockstodock is not set, then return.
+        if (!$this->page->theme->enable_dock || empty($CFG->allowblockstodock)) {
             return false;
         }