Fix mobile browser detection.
This commit is contained in:
parent
3f49d25575
commit
10b832b820
2 changed files with 1 additions and 20 deletions
|
|
@ -110,25 +110,6 @@ sub makePrintable {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 mobileBrowser ( )
|
||||
|
||||
Returns true if the user's browser matches any of the mobile browsers set in the config file.
|
||||
|
||||
=cut
|
||||
|
||||
sub mobileBrowser {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $ua = $session->env->get('HTTP_USER_AGENT');
|
||||
for my $mobileUA (@{ $session->config->get('mobileUserAgents') }) {
|
||||
if ($ua =~ m/$mobileUA/) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 useMobileStyle
|
||||
|
||||
Returns a true value if we are on a mobile display.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue