/// check that site is properly customized
if (empty($site->shortname) or empty($site->shortname)) {
- redirect('settings.php?section=frontpage&return=site');
+ redirect('settings.php?section=frontpagesettings&return=site');
}
/// Check if we are returning from moodle.org registration and if so, we mark that fact to remove reminders
// This file defines everything related to frontpage
+if (get_site()) { //do not use during installation
+
$frontpagecontext = get_context_instance(CONTEXT_COURSE, SITEID);
// "frontpage" settingpage
$ADMIN->add('frontpage', new admin_externalpage('frontpagerestore', get_string('frontpagerestore', 'admin'), $CFG->wwwroot.'/files/index.php?id='.SITEID.'&wdir=/backupdata', 'moodle/site:restore', false, $frontpagecontext));
$ADMIN->add('frontpage', new admin_externalpage('sitefiles', get_string('sitefiles'), $CFG->wwwroot . '/files/index.php?id=' . SITEID, 'moodle/course:managefiles', false, $frontpagecontext));
+
+}
?>
\ No newline at end of file