]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Revert "Bug 1468848 - Change presentation of show_bug.cgi urls to be /bug/ID or ...
authorDylan William Hardison <dylan@hardison.net>
Tue, 26 Jun 2018 20:59:30 +0000 (16:59 -0400)
committerGitHub <noreply@github.com>
Tue, 26 Jun 2018 20:59:30 +0000 (16:59 -0400)
This reverts commit 404dc5496967203c5f99755340f43d712420446a.

.htaccess
Bugzilla/Install/Localconfig.pm
README.rst
extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl
extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
extensions/BugModal/web/bug_modal.js
extensions/OpenGraph/template/en/default/hook/global/header-start.html.tmpl
template/en/default/global/header.html.tmpl
template/en/default/setup/strings.txt.pl

index ac0e40d88855c0c29c3c626870b4b3528e2ac4fd..ee7d296b0460d33162182ff7d8dac6d692356302 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -42,6 +42,7 @@ RewriteRule ^template_cache.deleteme/ - [F,L,NC]
 RewriteRule ^review$ page.cgi?id=splinter.html$1 [QSA]
 RewriteRule ^user_?profile$ page.cgi?id=user_profile.html$1 [QSA]
 RewriteRule ^request_defer$ page.cgi?id=request_defer.html$1 [QSA]
+RewriteRule ^([0-9]+)$ show_bug.cgi?id=$1 [QSA]
 RewriteRule ^favicon\.ico$ extensions/BMO/web/images/favicon.ico
 RewriteRule ^form[\.:]itrequest$ enter_bug.cgi?product=Infrastructure+\%26+Operations&format=itrequest [QSA]
 RewriteRule ^form[\.:](mozlist|poweredby|presentation|trademark|recoverykey)$ enter_bug.cgi?product=mozilla.org&format=$1 [QSA]
@@ -83,8 +84,6 @@ RewriteRule ^form[\.:]shield[\.:]studies$ enter_bug.cgi?product=Shield&format=sh
 RewriteRule ^form[\.:]client[\.:]bounty$ enter_bug.cgi?product=Firefox&format=client-bounty [QSA]
 RewriteRule ^rest - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
 RewriteRule ^rest/(.*)$ rest.cgi/$1 [NE]
-RewriteRule ^bug/([^/]+)$ show_bug.cgi?id=$1 [NE]
-RewriteRule ^([0-9]+)$ show_bug.cgi?id=$1 [QSA]
 RewriteRule ^(?:latest|1\.2|1\.3)/(.*)$ extensions/BzAPI/bin/rest.cgi/$1 [NE]
 RewriteRule ^bzapi/(.*)$ extensions/BzAPI/bin/rest.cgi/$1 [NE]
 RewriteRule ^login$ index.cgi?GoAheadAndLogIn=1 [NE]
index f6333f218b68d58302623e4ba35929efa7938a96..e1a8e0909423ff64aedd21980b597fbb8cc1ab4c 100644 (file)
@@ -163,10 +163,6 @@ use constant LOCALCONFIG_VARS => (
         name    => 'urlbase',
         default => _migrate_param( "urlbase", "" ),
     },
-    {
-        name    => 'canonical_urlbase',
-        default => '',
-    },
     {
         name    => 'attachment_base',
         default => _migrate_param( "attachment_base", '' ),
@@ -290,16 +286,13 @@ sub _read_localconfig_from_file {
 
 sub read_localconfig {
     my ($include_deprecated) = @_;
-    my $lc;
+
     if ($ENV{LOCALCONFIG_ENV}) {
-        $lc = _read_localconfig_from_env();
+        return _read_localconfig_from_env();
     }
     else {
-        $lc = _read_localconfig_from_file($include_deprecated);
+        return _read_localconfig_from_file($include_deprecated);
     }
-    $lc->{canonical_urlbase} //= $lc->{urlbase};
-
-    return $lc;
 }
 
 #
index bbc91bff29295e8f60f5f902d3382b3bc89d8f62..d8986fc7344a4f6e460062011c500df16ce651f8 100644 (file)
@@ -246,12 +246,9 @@ BUGZILLA_UNSAFE_AUTH_DELEGATION
 
 BMO_urlbase
   The public url for this instance. Note that if this begins with https://
-  and BMO_inbound_proxies is set to '*' Bugzilla will believe the connection to it
+  abd BMO_inbound_proxies is set to '*' Bugzilla will believe the connection to it
   is using SSL.
 
-BMO_canonical_urlbase
-  The public url for the production instance, if different from urlbase above.
-
 BMO_attachment_base
   This is the url for attachments.
   When the allow_attachment_display parameter is on, it is possible for a
index d7a4cc2a5f24db8253a1d8176d4d074dd191ae8b..f1896dccc7b706535de58a06ec5416af97302f07 100644 (file)
@@ -21,7 +21,7 @@
 
 <link rel="shortcut icon" href="extensions/BMO/web/images/favicon.ico">
 [% IF bug %]
-<link id="shorturl" rel="canonical" href="[% Bugzilla.localconfig.canonical_urlbase FILTER none %]bug/[% bug.bug_id FILTER uri %]">
+<link id="shorturl" rev="canonical" href="https://bugzil.la/[% bug.bug_id FILTER uri %]">
 [% END %]
 
 [%# *** Bug List Navigation *** %]
index c5ae78af3644c200e986da8702e000ac9ae39912..b9a42caf3977301d32ce81f99819ef246723d286 100644 (file)
@@ -89,7 +89,6 @@
   [%# expose useful data to js %]
   BUGZILLA.bug_id = [% bug.id FILTER none %];
   BUGZILLA.bug_title = '[% unfiltered_title FILTER js %]';
-  BUGZILLA.bug_alias = '[% bug.alias FILTER js %]';
   BUGZILLA.user = {
     id: [% user.id FILTER none %],
     login: '[% user.login FILTER js %]',
index ef015d3f9f0e5a6c9b2345d63d4de7348b6d2052..d232c172a1556d59126babad54d6cc85d0b9faa1 100644 (file)
@@ -1435,19 +1435,15 @@ function show_new_changes_indicator() {
 
 // fix url after bug creation/update
 if (history && history.replaceState) {
-    let bug_id    = BUGZILLA.bug_id;
-    let bug_alias = BUGZILLA.bug_alias;
-    let bug_slug  = bug_alias || bug_id;
-    let url       = new URL(document.location.href);
-    if (!url.pathname.match(/^bug\/[0-9]+/)) {
-        url.searchParams.delete("id");
-        let new_url = url.search ? `/bug/${bug_slug}${url.search}` : `/bug/${bug_slug}`;
-        if (url.hash) {
-            new_url += url.hash;
-        }
-        history.replaceState(null, BUGZILLA.bug_title, new_url);
+    var href = document.location.href;
+    if (!href.match(/show_bug\.cgi/)) {
+        history.replaceState(null, BUGZILLA.bug_title, 'show_bug.cgi?id=' + BUGZILLA.bug_id);
         document.title = BUGZILLA.bug_title;
     }
+    if (href.match(/show_bug\.cgi\?.*list_id=/)) {
+        href = href.replace(/[\?&]+list_id=(\d+|cookie)/, '');
+        history.replaceState(null, BUGZILLA.bug_title, href);
+    }
 }
 
 // ajax wrapper, to simplify error handling and auth
index 247e44ea913044c859b59c3099d345073773183e..51c388d427172fe4a891ba1a5432d0ded70b2b7f 100644 (file)
@@ -9,7 +9,7 @@
 [% USE Bugzilla %]
 <meta property="og:type" content="website">
 <meta property="og:title" content="[% title FILTER none %]">
-<meta property="og:url" content="[% Bugzilla.cgi.url FILTER html %]">
+<meta property="og:url" content="[% Bugzilla.cgi.self_url FILTER html %]">
 [% IF bug %]
 <meta property="og:description"
       content="[% bug.bug_status FILTER html %] ([% bug.assigned_to.login FILTER email FILTER html %]) in [% bug.product FILTER html %] - [% bug.component FILTER html %]. Last updated [% bug.delta_ts FILTER time('%Y-%m-%d') %].">
index 492d70a2455b2cb4830e73b168cc28e76b9489a3..153137394b8657efda7a9ab32102537ab308c137 100644 (file)
 
     <meta name="viewport" content="width=1024">
     <meta name="generator" content="[% terms.Bugzilla _ " " _ constants.BUGZILLA_VERSION FILTER html %]">
-    <base href="[% urlbase FILTER html %]">
     <meta name="bugzilla-global" content="dummy"
         id="bugzilla-global" data-bugzilla="[% json_encode(js_BUGZILLA) FILTER html %]">
     <title>[% title %]</title>
index fe375400d76254f9eb671af99a7161278c29a72e..8726a8b1388c948b56a7371d9c31e4c40e5f1da1 100644 (file)
@@ -230,10 +230,6 @@ Only the keys listed below can be overridden.
 END
     localconfig_urlbase => <<'END',
 The URL that is the common initial leading part of all URLs.
-END
-    localconfig_canonical_urlbase => <<'END',
-The URL that is the canonical initial leading part of all URLs.
-This will be the production url for a dev site, for instance.
 END
     localconfig_use_suexec => <<'END',
 Set this to 1 if Bugzilla runs in an Apache SuexecUserGroup environment.