} } // all new installs are in unicode - keep for backwards compatibility and 1.8 upgrade checks set_config('unicodedb', 1); /// Continue with the instalation $db->debug = false; if ($status) { /// Groups install is now in core above. // Install the roles system. moodle_install_roles(); set_config('statsrolesupgraded', time()); // install core event handlers events_update_definition(); /// This is used to handle any settings that must exist in $CFG but which do not exist in /// admin_get_root()/$ADMIN as admin_setting objects (there are some exceptions). apply_default_exception_settings(array('auth' => 'email', 'auth_pop3mailbox' => 'INBOX', 'enrol' => 'manual', 'enrol_plugins_enabled' => 'manual', 'style' => 'default', 'template' => 'default', 'theme' => 'standardwhite', 'filter_multilang_converted' => 1)); // Write default settings unconditionally (i.e. even if a setting is already set, overwrite it) // (this should only have any effect during initial install). admin_apply_default_settings(NULL, true); notify($strdatabasesuccess, "green"); require_once $CFG->dirroot . '/mnet/lib.php'; } else { error("Error: Main databases NOT set up successfully"); } print_continue('index.php'); print_footer('none'); die; } /// Check version of Moodle code on disk compared with database /// and upgrade if possible. if (file_exists("{$CFG->dirroot}/lib/db/{$CFG->dbtype}.php")) {
//ugly hack - install new groups: MDL-9217 require "{$CFG->dirroot}/group/version.php"; set_config('group_version', $group_version); //install_group_db(); // Install the roles system. moodle_install_roles(); set_config('statsrolesupgraded', time()); // Write default settings unconditionally (i.e. even if a setting is already set, overwrite it) // (this should only have any effect during initial install). $adminroot = admin_get_root(); $adminroot->prune('backups'); // backup settings table not created yet apply_default_settings($adminroot); /// This is used to handle any settings that must exist in $CFG but which do not exist in /// admin_get_root()/$ADMIN as admin_setting objects (there are some exceptions). apply_default_exception_settings(array('alternateloginurl' => '', 'auth' => 'email', 'auth_pop3mailbox' => 'INBOX', 'changepassword' => '', 'enrol' => 'manual', 'enrol_plugins_enabled' => 'manual', 'guestloginbutton' => 1, 'registerauth' => 'email', 'style' => 'default', 'template' => 'default', 'theme' => 'standardwhite', 'filter_multilang_converted' => 1)); notify($strdatabasesuccess, "green"); require_once $CFG->dirroot . '/mnet/lib.php'; } else { error("Error: Main databases NOT set up successfully"); } print_continue('index.php'); print_footer('none'); die; } /// Check version of Moodle code on disk compared with database /// and upgrade if possible. if (file_exists("{$CFG->dirroot}/lib/db/{$CFG->dbtype}.php")) { include_once "{$CFG->dirroot}/lib/db/{$CFG->dbtype}.php"; # defines old upgrades }