MDL-8343 reorganize frontpage settings in admintree - fixed installation bug and warnings
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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));
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user