MDL-16630 do not show admin tree until the site is fully configured

This commit is contained in:
skodak
2009-07-09 20:17:41 +00:00
parent 092bfaf10f
commit 462caf41b2
+8 -2
View File
@@ -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;
}
}
?>