Commit 9c34ee34 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

Merge "Bug 1588613: Later session start so we can use DB config table"

parents 9861ba11 12cb73cf
......@@ -114,10 +114,6 @@ if (file_exists($locallib)) {
require($locallib);
}
// Start up a session object, in case we need to use it to print messages
require_once('auth/session.php');
$SESSION = Session::singleton();
// Database access functions
require('adodb/adodb-exceptions.inc.php');
require('adodb/adodb.inc.php');
......@@ -199,6 +195,11 @@ 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'])) {
......
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