]> git.mjollnir.org Git - moodle.git/commitdiff
block MDL-19946 fix "cannot add block" bug (Tim's fix)
authorjerome <jerome>
Thu, 30 Jul 2009 09:40:11 +0000 (09:40 +0000)
committerjerome <jerome>
Thu, 30 Jul 2009 09:40:11 +0000 (09:40 +0000)
lib/blocklib.php

index 6787a37edf650335ed222816451d43b1b4b58380..0aa7f80c32cc5efd5e2ad63676a5b6da275949ff 100644 (file)
@@ -880,7 +880,7 @@ class block_manager {
 
         confirm_sesskey();
 
-        if ($this->page->user_can_edit_blocks()) {
+        if (!$this->page->user_can_edit_blocks()) {
             throw new moodle_exception('nopermissions', '', $this->page->url->out(), get_string('addblock'));
         }