Commit cf415bb0 authored by Dmitrii Metelkin's avatar Dmitrii Metelkin Committed by Robert Lyon

Bug#1592236: initialise a session after wwwroot is set

behatnotneeded

Change-Id: Ia73346aa5a71952ee01d4955b864c7f2573d4a03
(cherry picked from commit 23318637)
parent 8825bed5
......@@ -190,11 +190,6 @@ catch (SQLException $e) {
db_ignore_sql_exceptions(false);
}
// Start up a session object, in case we need to use it to print messages
require_once('auth/session.php');
$SESSION = Session::singleton();
// Make sure wwwroot is set and available, either in the database or in the
// config file. Cron requires it when sending out forums emails.
if (!isset($CFG->wwwroot) && isset($_SERVER['HTTP_HOST'])) {
......@@ -249,6 +244,10 @@ if (isset($CFG->wwwroot)) {
}
}
// Start up a session object, in case we need to use it to print messages
require_once('auth/session.php');
$SESSION = Session::singleton();
// If we have cleanurl subdomains turned on, we need to set cookiedomain
// to ensure cookies are given back to us in all subdomains
if (isset($CFG->cleanurls) && isset($CFG->cleanurlusersubdomains) && !isset($CFG->cookiedomain)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment