MDL-16630 do not show admin tree until the site is fully configured
This commit is contained in:
@@ -103,7 +103,7 @@ class block_admin_tree extends block_base {
|
||||
}
|
||||
|
||||
function get_content() {
|
||||
global $CFG, $OUTPUT;
|
||||
global $CFG, $OUTPUT, $COURSE;
|
||||
|
||||
if ($this->content !== NULL) {
|
||||
return $this->content;
|
||||
@@ -115,6 +115,12 @@ class block_admin_tree extends block_base {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($COURSE->shortname === '') {
|
||||
// remove admin block if site not fully configured yet
|
||||
$this->content = '';
|
||||
return '';
|
||||
}
|
||||
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
$adminroot = admin_get_root(false, false); // settings not required - only pages
|
||||
|
||||
@@ -162,4 +168,4 @@ class block_admin_tree extends block_base {
|
||||
return $this->content;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user