From: thepurpleblob Date: Fri, 27 Jun 2008 13:12:21 +0000 (+0000) Subject: MDL-15447 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=68ad9ccc59eb892a1e393fa7781780bf5828103f;p=moodle.git MDL-15447 Admin search option only shown if user has moodle/site:config capability Merged from STABLE_19 --- diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php index f05bdb9375..53c041cd29 100644 --- a/blocks/admin_tree/block_admin_tree.php +++ b/blocks/admin_tree/block_admin_tree.php @@ -208,12 +208,17 @@ collapseall(); //]]> '; - $this->content->footer = '
'. + // only do search if you have moodle/site:config + if (has_capability('moodle/site:config',get_context_instance(CONTEXT_SYSTEM)) ) { + $this->content->footer = '
'. '
'. ''. ''. '
'. '
'; + } else { + $this->content->footer = ''; + } } else { $this->content = new object(); $this->content->text = '';