MDL-8343 reorganize frontpage settings in admintree - fixed installation bug and...
authorskodak <skodak>
Tue, 30 Jan 2007 09:33:11 +0000 (09:33 +0000)
committerskodak <skodak>
Tue, 30 Jan 2007 09:33:11 +0000 (09:33 +0000)
admin/index.php
admin/settings/frontpage.php
theme/standardwhite/footer.html

index 56a9d36afe9bd43bdc31c2a24620d698f3f0df0b..d47f9e93bfbe992e7a5140c5c8dc402ef6b275e7 100644 (file)
 
 /// check that site is properly customized
     if (empty($site->shortname) or empty($site->shortname)) {
-        redirect('settings.php?section=frontpage&amp;return=site');
+        redirect('settings.php?section=frontpagesettings&amp;return=site');
     }
 
 /// Check if we are returning from moodle.org registration and if so, we mark that fact to remove reminders
index db771848612d2faff42010f1e68a5f4dc0f375b3..576d9c6efae19200fc9810779c2216b8c0e96534 100644 (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.'&amp;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
index 5a63efe65b4a1bee4284a4e0c3934eaf0fa28486..5c790f4420c9836ab7d78d6b87143d8b6dcea1d7 100644 (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;
     }