From: Dave Lawrence Date: Mon, 23 Jul 2012 21:58:45 +0000 (-0400) Subject: Bug 767308 - Bug id should be last field in URL query string (after list_id) X-Git-Tag: bugzilla-4.3.2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a63ac0764abca55f1b61a4c0719315002c02ac0;p=thirdparty%2Fbugzilla.git Bug 767308 - Bug id should be last field in URL query string (after list_id) r=glob, a=LpSolit --- diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl index 095b91086c..6d4e2d595a 100644 --- a/template/en/default/bug/show-header.html.tmpl +++ b/template/en/default/bug/show-header.html.tmpl @@ -24,11 +24,18 @@ [% IF bug.defined %] [% unfiltered_title = "$terms.Bug $bug.bug_id – $bug.short_desc" %] [% javascript = BLOCK %] - if( !document.location.href.match(/show_bug\.cgi/) && history && history.replaceState ) { - history.replaceState( null, - "[% unfiltered_title FILTER js %]", - "show_bug.cgi?id=[% bug.bug_id FILTER js %]" ); - document.title = "[% unfiltered_title FILTER js %]"; + if (history && history.replaceState) { + if(!document.location.href.match(/show_bug\.cgi/)) { + history.replaceState( null, + "[% unfiltered_title FILTER js %]", + "show_bug.cgi?id=[% bug.bug_id FILTER js %]" ); + document.title = "[% unfiltered_title FILTER js %]"; + } + if (document.location.href.match(/show_bug\.cgi\?.*list_id=/)) { + var href = document.location.href; + href = href.replace(/[\?&]+list_id=(\d+|cookie)/, ''); + history.replaceState(null, "[% unfiltered_title FILTER js %]", href); + } } [% javascript FILTER none %] [% END %]