From d6f47aa5f07a11a8771ce95f156b5394e67285a8 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 8 Oct 2015 08:28:46 -0400 Subject: Bug 1200765 - Make login UX mobile friendly to assist mobile authentication workflow --- Bugzilla/Template.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/Template.pm') diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index bc0d77084..b03698477 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -1117,6 +1117,11 @@ sub create { return \@optional; }, 'default_authorizer' => sub { return Bugzilla::Auth->new() }, + + # It is almost always better to do mobile feature detection, client side in js. + # However, we need to set the meta[name=viewport] server-side or the behavior is + # not as predictable. It is possible other parts of the frontend may use this feature too. + 'is_mobile_browser' => sub { return Bugzilla->cgi->user_agent =~ /Mobi/ }, }, }; # Use a per-process provider to cache compiled templates in memory across -- cgit v1.2.3-24-g4f1b