]> git.mjollnir.org Git - moodle.git/commitdiff
blocks/admin_tree: applicable_formats() is called as a class method
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:47:38 +0000 (07:47 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:47:38 +0000 (07:47 +0000)
Can't find it documented anywhere, but applicable_formats() is only
ever called as a class method, so it cannot say $this. Instead, say
block_admin_tree::has_admin_caps().

blocks/admin_tree/block_admin_tree.php

index 5213463016d405162d67372ff4fbea9f83eba6da..c2acc2e2987fa5ddd3d1cfb054a627c0ad39ecea 100644 (file)
@@ -22,7 +22,7 @@ class block_admin_tree extends block_base {
     }
 
     function applicable_formats() {
-        if ($this->has_admin_caps()) {
+        if (block_admin_tree::has_admin_caps()) {
             return array('site' => true, 'admin' => true);
         } else {
             return array('site' => true);