File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
template/en/default/global Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ use constant SUB_CLASSES => qw(
70
70
Bugzilla::BugUrl::MantisBT
71
71
Bugzilla::BugUrl::SourceForge
72
72
Bugzilla::BugUrl::GitHub
73
+ Bugzilla::BugUrl::MozSupport
73
74
) ;
74
75
75
76
# ##############################
Original file line number Diff line number Diff line change
1
+ # This Source Code Form is subject to the terms of the Mozilla Public
2
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
+ #
5
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
6
+ # defined by the Mozilla Public License, v. 2.0.
7
+
8
+ package Bugzilla::BugUrl::MozSupport ;
9
+ use strict;
10
+ use base qw( Bugzilla::BugUrl) ;
11
+
12
+ # ##############################
13
+ # ### Methods ####
14
+ # ##############################
15
+
16
+ sub should_handle {
17
+ my ($class , $uri ) = @_ ;
18
+
19
+ # Mozilla support questions normally have the form:
20
+ # https://support.mozilla.org/<language>/questions/<id>
21
+ return ($uri -> authority =~ / ^support.mozilla.org$ /i
22
+ and $uri -> path =~ m | ^(/[^/]+)?/questions/\d +$ | ) ? 1 : 0;
23
+ }
24
+
25
+ sub _check_value {
26
+ my ($class , $uri ) = @_ ;
27
+
28
+ $uri = $class -> SUPER::_check_value($uri );
29
+
30
+ # Support.mozilla.org redirects to https automatically
31
+ $uri -> scheme(' https' );
32
+
33
+ return $uri ;
34
+ }
35
+
36
+ 1;
Original file line number Diff line number Diff line change 275
275
<li>A b[% %]ug in a MantisBT installation.</li>
276
276
<li>A b[% %]ug on sourceforge.net.</li>
277
277
<li>An issue on github.com.</li>
278
+ <li>A question on support.mozilla.org</li>
278
279
</ul>
279
280
[% ELSIF reason == 'id' %]
280
281
There is no valid [% terms.bug %] id in that URL.
You can’t perform that action at this time.
0 commit comments