summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2015-10-08 14:28:46 +0200
committerDylan William Hardison <dylan@hardison.net>2015-10-08 14:29:01 +0200
commitd6f47aa5f07a11a8771ce95f156b5394e67285a8 (patch)
treeaffa3ce076aacf5a7813e6e10415831d224b18f9 /Bugzilla/Template.pm
parent4ce3037df61ddee7eb20e744853d0b3e3990dcac (diff)
downloadbugzilla-d6f47aa5f07a11a8771ce95f156b5394e67285a8.tar.gz
bugzilla-d6f47aa5f07a11a8771ce95f156b5394e67285a8.tar.xz
Bug 1200765 - Make login UX mobile friendly to assist mobile authentication workflow
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm5
1 files changed, 5 insertions, 0 deletions
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