Commit ed770e40 authored by Son Nguyen's avatar Son Nguyen
Browse files

Check if the Mahara installed before access the database table (bug


Before get the user's account preferences, make sure Mahara site has
been installed.

Change-Id: I49c8b12d5ed0b88c5856488ac9a11500c0cd6824
Signed-off-by: default avatarSon Nguyen <>
parent 7414c487
......@@ -350,7 +350,7 @@ if (defined('JSON') && !defined('NOSESSKEY')) {
// Device detection
if (get_account_preference($USER->get('id'), 'devicedetection')) {
if (get_config('installed') && get_account_preference($USER->get('id'), 'devicedetection')) {
require_once(get_config('libroot') . 'mobile_detect/Mobile_Detect.php');
$detect = new Mobile_Detect();
$SESSION->set('handheld_device', $detect->isMobile());
Supports Markdown
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