]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11061 removed wwwroot tests from admin/index.php, now in setuplib.php
authorskodak <skodak>
Wed, 7 Jan 2009 15:31:54 +0000 (15:31 +0000)
committerskodak <skodak>
Wed, 7 Jan 2009 15:31:54 +0000 (15:31 +0000)
admin/index.php
lang/en_utf8/error.php
lib/setuplib.php

index 1e1dd2adb566b4e917d8c65bd776b379e71b6a61..0a0d0b8cb24236576600063d621cae17f363aaa9 100644 (file)
         print_box(get_string('displayerrorswarning', 'admin'), 'generalbox adminwarning');
     }
 
-    if (substr($CFG->wwwroot, -1) == '/') {
-        print_box(get_string('cfgwwwrootslashwarning', 'admin'), 'generalbox adminwarning');
-    }
-    if (strpos($FULLME, $CFG->httpswwwroot.'/') === false) {
-        print_box(get_string('cfgwwwrootwarning', 'admin'), 'generalbox adminwarning');
-    }
-
 /// If no recently cron run
     $lastcron = $DB->get_field_sql('SELECT MAX(lastcron) FROM {modules}');
     if (time() - $lastcron > 3600 * 24) {
index 2fae06d5a406ab01fe70ed84a37a75df05a03017..5f21bd2f4ce7a930c91f90e7804c5e7d13b96eb2 100644 (file)
@@ -477,6 +477,7 @@ $string['wrongroleid'] = 'Incorrect role ID!';
 $string['wrongsourcebase'] = 'Wrong source URL base';
 $string['wrongzipfilename'] = 'Wrong ZIP file name';
 $string['wwwrootmismatch'] = 'Incorrect access detected, this server may be accessed only through \"$a\" address, sorry.<br />Please notify server administrator.';
+$string['wwwrootslash'] = 'Detected incorrect \$CFG->wwwroot in config.php, it must not contain trailing slash.<br />Please notify server administrator.';
 $string['xmldberror'] = 'XMLDB error!';
 $string['youcannotdeletecategory'] = 'You cannot delete category \'$a\' becuase you can neither delete the contents, nor move them elsewhere.';
 
index 1d8ca93acb62e4052e7fa0906a545abb04b2562d..1a344ea7ad798ad538ced4874b1db51bc14cc1c3 100644 (file)
@@ -91,6 +91,10 @@ function default_exception_handler($ex) {
 function initialise_fullme() {
     global $CFG, $FULLME, $ME, $SCRIPT, $FULLSCRIPT;
 
+    if (substr($CFG->wwwroot, -1) == '/') {
+        print_error('wwwrootslash', 'error');
+    }
+
     $url = parse_url($CFG->wwwroot);
     if (!isset($url['path'])) {
         $url['path'] = '';