Revision 40592ad9
Von Bernd Bleßmann vor etwa 1 Jahr hinzugefügt
SL/Request.pm | ||
---|---|---|
10 | 10 |
use Exporter qw(import); |
11 | 11 |
|
12 | 12 |
use SL::Common; |
13 |
use SL::Helper::UserPreferences::DisplayPreferences; |
|
14 | 13 |
use SL::JSON; |
15 | 14 |
use SL::MoreCommon qw(uri_encode uri_decode); |
16 | 15 |
use SL::Layout::None; |
... | ... | |
41 | 40 |
} |
42 | 41 |
|
43 | 42 |
sub init_is_mobile { |
44 |
# user can force a layout version |
|
45 |
my $user_prefs = SL::Helper::UserPreferences::DisplayPreferences->new(); |
|
46 |
return 0 if ($user_prefs->get_layout_style || '') eq 'desktop'; |
|
47 |
return 1 if ($user_prefs->get_layout_style || '') eq 'mobile'; |
|
48 |
|
|
49 | 43 |
# mobile clients will change their user agent when the user requests |
50 | 44 |
# desktop version so user agent is the most reliable way to identify |
51 | 45 |
return ($ENV{HTTP_USER_AGENT} || '') =~ /Mobi/ ? 1 : 0; |
Auch abrufbar als: Unified diff
Revert "Erzwungener Layout-Stil: Request: is_mobile berücksichtigt Benutzereinstellung"
Hier ist die Datenbank u.U. noch nicht erreichbar.
This reverts commit 03336f58ca490c3c950585b14f9c1f587f55e232.