Skip to content
GitLab
Menu
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
c416b976
Commit
c416b976
authored
Sep 19, 2012
by
Hugh Davenport
Browse files
debugging for disabling device detection
Change-Id: I56d983658fcf3ceb64b45657ace446276177abf5
parent
303409a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/init.php
View file @
c416b976
...
...
@@ -350,13 +350,17 @@ 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'
))
{
require_once
(
get_config
(
'libroot'
)
.
'mobile_detect/Mobile_Detect.php'
);
$detect
=
new
Mobile_Detect
();
$SESSION
->
set
(
'handheld_device'
,
(
$detect
->
isMobile
()
||
$detect
->
isTablet
()));
$SESSION
->
set
(
'mobile'
,
$detect
->
isMobile
());
$SESSION
->
set
(
'tablet'
,
$detect
->
isTablet
());
$SESSION
->
add_info_message
(
'done detection'
);
$SESSION
->
add_info_message
(
print_r
(
$SESSION
,
true
));
}
else
{
$SESSION
->
add_info_message
(
'no detection'
);
}
/*
...
...
Write
Preview
Supports
Markdown
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