MDL-17457 moved a lot of code into lib/db/install.php + other refactoring and cleanup

This commit is contained in:
skodak 2009-01-11 09:41:48 +00:00
parent 51176ec09c
commit 1caea91efb
15 changed files with 280 additions and 361 deletions

View file

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