From eeefd0b0dfc285e725a5e7202b295d4c280b7ef6 Mon Sep 17 00:00:00 2001 From: paca70 Date: Wed, 11 May 2005 08:57:14 +0000 Subject: [PATCH] Use SITEID instead of hardcoded value. SITEID could be != 1 in older installations. --- admin/maintenance.php | 2 +- lib/moodlelib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/maintenance.php b/admin/maintenance.php index e85e84d1152..1d537ee3051 100644 --- a/admin/maintenance.php +++ b/admin/maintenance.php @@ -17,7 +17,7 @@ error("Could not create site folder. The site administrator needs to fix the file permissions"); } - $filename = $CFG->dataroot.'/1/maintenance.html'; + $filename = $CFG->dataroot.'/'.SITEID.'/maintenance.html'; if ($form = data_submitted()) { if (confirm_sesskey()) { diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 738490c08cc..60f8d80b64d 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1280,7 +1280,7 @@ function require_login($courseid=0, $autologinguest=true, $cm=null) { // If the site is currently under maintenance, then print a message if (!isadmin()) { - if (file_exists($CFG->dataroot.'/1/maintenance.html')) { + if (file_exists($CFG->dataroot.'/'.SITEID.'/maintenance.html')) { print_maintenance_message(); exit; }