From 68ad9ccc59eb892a1e393fa7781780bf5828103f Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Fri, 27 Jun 2008 13:12:21 +0000 Subject: [PATCH] MDL-15447 Admin search option only shown if user has moodle/site:config capability Merged from STABLE_19 --- blocks/admin_tree/block_admin_tree.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 = ''; -- 2.39.5