MDL-8343 reorganize frontpage settings in admintree - fixed installation bug and warnings

This commit is contained in:
skodak
2007-01-30 09:33:11 +00:00
parent 3ab00a0f6d
commit 71eee5f216
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -498,7 +498,7 @@
/// 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
+4
View File
@@ -2,6 +2,8 @@
// This file defines everything related to frontpage
if (get_site()) { //do not use during installation
$frontpagecontext = get_context_instance(CONTEXT_COURSE, SITEID);
// "frontpage" settingpage
@@ -35,4 +37,6 @@ $ADMIN->add('frontpage', new admin_externalpage('frontpagebackup', get_string('f
$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));
}
?>
+1 -1
View File
@@ -15,7 +15,7 @@
<?php
if (isadmin() and !empty($performanceinfo)) {
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)) and !empty($performanceinfo)) {
echo $performanceinfo;
}