MDL-8323 Add proper setup of course $CFG variables, fix use of global $COURSE
new function course_setup() thats does proper $CFG-> , locale and themes setup much sooner than print_header() originally (needed for MDL-8067), cleanup of forgotten global $course issues MDL-8067 Fixed several $HTTPSREQUIRED issues - html editor now loads from https (the old hack did not wotk with IE7, new hack is uglier but works), fixed formlibs images (we can not set them in library global scope, we must wait for httpsrequired() and require_login() and od that in function), fixed links in meta.php, fixed help images fixed setting of new $USER values in user edit forms
This commit is contained in:
+2
-4
@@ -540,8 +540,6 @@ global $HTTPSPAGEREQUIRED;
|
||||
$CFG->theme = 'standardwhite';
|
||||
}
|
||||
|
||||
theme_setup(); // Sets up theme global variables
|
||||
|
||||
/// now do a session test to prevent random user switching - observed on some PHP/Apache combinations,
|
||||
/// disable checks when working in cookieless mode
|
||||
if (empty($CFG->usesid) || !empty($_COOKIE['MoodleSession'.$CFG->sessioncookie])) {
|
||||
@@ -577,8 +575,8 @@ global $HTTPSPAGEREQUIRED;
|
||||
}
|
||||
}
|
||||
|
||||
// set default locale - might be changed again later in require_login()
|
||||
moodle_setlocale();
|
||||
// set default locale and themes - might be changed again later from require_login()
|
||||
course_setup();
|
||||
|
||||
if (!empty($CFG->opentogoogle)) {
|
||||
if (empty($USER->id)) { // Ignore anyone logged in
|
||||
|
||||
Reference in New Issue
Block a user