blocks MDL-23935 fixed abuse of moodle_page protected variables
authorSam Hemelryk <sam@moodle.com>
Thu, 26 Aug 2010 06:27:47 +0000 (06:27 +0000)
committerSam Hemelryk <sam@moodle.com>
Thu, 26 Aug 2010 06:27:47 +0000 (06:27 +0000)
lib/blocklib.php
lib/pagelib.php

index 44666eb..cd3e7c5 100644 (file)
@@ -1114,7 +1114,7 @@ class block_manager {
         $editurlparams = $this->page->url->params();
         $editurlparams['bui_editid'] = $blockid;
         $editpage->set_url($editurlbase, $editurlparams);
-        $editpage->_block_actions_done = true;
+        $editpage->set_block_actions_done();
         // At this point we are either going to redirect, or display the form, so
         // overwrite global $PAGE ready for this. (Formslib refers to it.)
         $PAGE = $editpage;
index 98f82dd..eaf2938 100644 (file)
@@ -1613,6 +1613,10 @@ class moodle_page {
     public function has_set_url() {
         return ($this->_url!==null);
     }
+
+    public function set_block_actions_done($setting = true) {
+        $this->_block_actions_done = $setting;
+    }
 }
 
 /**