]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12231 fixed applying of CFG defaults during initial install phase; merged from...
authorskodak <skodak>
Sat, 17 Nov 2007 21:21:37 +0000 (21:21 +0000)
committerskodak <skodak>
Sat, 17 Nov 2007 21:21:37 +0000 (21:21 +0000)
admin/settings/top.php

index d76f04b8f006a9ff255f6211ded88b8fb16cfba9..5e72efdc5e6582aa1731aab2635249a6d740b405 100644 (file)
@@ -6,7 +6,12 @@
 // are added to them.
 
 $systemcontext = get_context_instance(CONTEXT_SYSTEM);
-$hassiteconfig = has_capability('moodle/site:config', $systemcontext);
+if (get_site()) {
+    $hassiteconfig = has_capability('moodle/site:config', $systemcontext);
+} else {
+    // installation starts - no permission checks
+    $hassiteconfig = true;
+}
 
 $ADMIN->add('root', new admin_externalpage('adminnotifications', get_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php"));