Commit 50f5667e authored by Hugh Davenport's avatar Hugh Davenport

Revert "Add option to disable device detection"

This reverts commit 303409a1.
parent 44e46432
......@@ -352,12 +352,10 @@ if (defined('JSON') && !defined('NOSESSKEY')) {
// Device detection
require_once(get_config('libroot') . 'mobile_detect/Mobile_Detect.php');
if (!get_account_preference($USER->get('id'), 'disabledevicedetection')) {
$detect = new Mobile_Detect();
$SESSION->set('handheld_device', ($detect->isMobile() || $detect->isTablet()));
$SESSION->set('mobile', $detect->isMobile());
$SESSION->set('tablet', $detect->isTablet());
}
$detect = new Mobile_Detect();
$SESSION->set('handheld_device', ($detect->isMobile() || $detect->isTablet()));
$SESSION->set('mobile', $detect->isMobile());
$SESSION->set('tablet', $detect->isTablet());
/*
* Initializes our performance info early.
......
......@@ -214,7 +214,6 @@ function expected_account_preferences() {
'mobileuploadtoken' => '',
'theme' => '',
'resizeonuploaduserdefault' => 1,
'disabledevicedetection' => 0,
);
}
......@@ -377,15 +376,6 @@ function general_account_prefs_form_elements($prefs) {
);
}
if (get_config('userscandisabledevicedetection')) {
$elements['disabledevicedetection'] = array(
'type' => 'checkbox',
'title' => get_string('disabledevicedetection', 'account'),
'description' => get_string('disabledevicedetectiondescription', 'accont'),
'defaultvalue' => $prefs->disabledevicedetection,
);
}
return $elements;
}
......
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