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) {
$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.';
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'] = '';