From: mkanat%bugzilla.org <> Date: Fri, 12 Sep 2008 03:09:19 +0000 (+0000) Subject: Bug 15089: Make buglist.cgi shorten search URLs by cleaning them and then redirecting... X-Git-Tag: bugzilla-3.3.1~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e770628c3c39ada722c0a71348f854f29e34a6c;p=thirdparty%2Fbugzilla.git Bug 15089: Make buglist.cgi shorten search URLs by cleaning them and then redirecting with the cleaned URL. Patch By Mikhail Gusarov r=mkanat, a=mkanat --- diff --git a/buglist.cgi b/buglist.cgi index 6619fdd658..687146ed64 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -66,6 +66,17 @@ if (length($buffer) == 0) { ThrowUserError("buglist_parameters_required"); } +# +# If query was POSTed, clean the URL from empty parameters and redirect back to +# itself. This will make advanced search URLs more tolerable. +# +if ($cgi->request_method() eq 'POST') { + $cgi->clean_search_url(); + + print $cgi->redirect(-url => $cgi->self_url()); + exit; +} + # Determine whether this is a quicksearch query. my $searchstring = $cgi->param('quicksearch'); if (defined($searchstring)) { diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl index 1f1fd50ab8..cb0519a817 100644 --- a/template/en/default/search/search-advanced.html.tmpl +++ b/template/en/default/search/search-advanced.html.tmpl @@ -64,7 +64,7 @@ var queryform = "queryform" // --> -
+ [% PROCESS search/form.html.tmpl %]