Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
50f5667e
Commit
50f5667e
authored
Sep 20, 2012
by
Hugh Davenport
Browse files
Revert "Add option to disable device detection"
This reverts commit
303409a1
.
parent
44e46432
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/init.php
View file @
50f5667e
...
...
@@ -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.
...
...
htdocs/lib/user.php
View file @
50f5667e
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment