Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
50f5667e
Commit
50f5667e
authored
Sep 20, 2012
by
Hugh Davenport
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add option to disable device detection"
This reverts commit
303409a1
.
parent
44e46432
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
16 deletions
+4
-16
htdocs/init.php
htdocs/init.php
+4
-6
htdocs/lib/user.php
htdocs/lib/user.php
+0
-10
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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