Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 403858 Details for
Bug 362977
See Also: please permit GNU Savannah reports
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-BugUrl-add-GNU-Savannah-support.patch
0001-BugUrl-add-GNU-Savannah-support.patch (text/plain), 3.00 KB, created by
SpanKY
on 2015-05-24 05:53:10 UTC
(
hide
)
Description:
0001-BugUrl-add-GNU-Savannah-support.patch
Filename:
MIME Type:
Creator:
SpanKY
Created:
2015-05-24 05:53:10 UTC
Size:
3.00 KB
patch
obsolete
>From 62ef98df72e36fc4f32d45c8b9b44c9c07b289c9 Mon Sep 17 00:00:00 2001 >From: Mike Frysinger <vapier@gentoo.org> >Date: Sun, 24 May 2015 01:23:22 -0400 >Subject: [PATCH bugzilla] BugUrl: add GNU Savannah support > >X-Gentoo-Bug: 362977 >X-Gentoo-Bug-URL: https://bugs.gentoo.org/362977 >--- > Bugzilla/BugUrl.pm | 1 + > Bugzilla/BugUrl/Savannah.pm | 45 +++++++++++++++++++++++++ > template/en/default/global/user-error.html.tmpl | 1 + > 3 files changed, 47 insertions(+) > create mode 100644 Bugzilla/BugUrl/Savannah.pm > >diff --git a/Bugzilla/BugUrl.pm b/Bugzilla/BugUrl.pm >index 8689e8a..6266090 100644 >--- a/Bugzilla/BugUrl.pm >+++ b/Bugzilla/BugUrl.pm >@@ -56,6 +56,7 @@ use constant SUB_CLASSES => qw( > Bugzilla::BugUrl::JIRA > Bugzilla::BugUrl::Trac > Bugzilla::BugUrl::MantisBT >+ Bugzilla::BugUrl::Savannah > Bugzilla::BugUrl::SourceForge > Bugzilla::BugUrl::GitHub > ); >diff --git a/Bugzilla/BugUrl/Savannah.pm b/Bugzilla/BugUrl/Savannah.pm >new file mode 100644 >index 0000000..531f30e >--- /dev/null >+++ b/Bugzilla/BugUrl/Savannah.pm >@@ -0,0 +1,45 @@ >+# This Source Code Form is subject to the terms of the Mozilla Public >+# License, v. 2.0. If a copy of the MPL was not distributed with this >+# file, You can obtain one at http://mozilla.org/MPL/2.0/. >+# >+# This Source Code Form is "Incompatible With Secondary Licenses", as >+# defined by the Mozilla Public License, v. 2.0. >+ >+package Bugzilla::BugUrl::Savannah; >+use strict; >+use base qw(Bugzilla::BugUrl); >+ >+############################### >+#### Methods #### >+############################### >+ >+sub should_handle { >+ my ($class, $uri) = @_; >+ >+ # Savannah URLs look like the following (the index.php is optional): >+ # https://savannah.gnu.org/bugs/index.php?107657 >+ # https://savannah.gnu.org/patch/index.php?107657 >+ # https://savannah.gnu.org/support/index.php?107657 >+ # https://savannah.gnu.org/task/index.php?107657 >+ return ($uri->path_query =~ m|/(bugs\|patch\|support\|task)/?(index\.php)?\?\d+$|) ? 1 : 0; >+} >+ >+sub _check_value { >+ my $class = shift; >+ >+ my $uri = $class->SUPER::_check_value(@_); >+ >+ # Remove any # part if there is one. >+ $uri->fragment(undef); >+ >+ # Savannah HTTP URLs redirect to HTTPS, so just use the HTTPS scheme. >+ $uri->scheme('https'); >+ >+ # Strip the index.php if there is one. >+ $uri->path =~ m|(/[^/]+)/?(index\.php)?$|; >+ $uri->path("$1/"); >+ >+ return $uri; >+} >+ >+1; >diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl >index 1baba99..acb4275 100644 >--- a/template/en/default/global/user-error.html.tmpl >+++ b/template/en/default/global/user-error.html.tmpl >@@ -274,6 +274,7 @@ > <li>A b[% %]ug in a MantisBT installation.</li> > <li>A b[% %]ug on sourceforge.net.</li> > <li>An issue on github.com.</li> >+ <li>A tracker item on a GNU Savannah forge.</li> > [% Hook.process('bug_url_invalid_tracker') %] > </ul> > [% END %] >-- >2.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 362977
: 403858