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

Revert "Add option to disable device detection"

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