From: Simon Green Date: Fri, 29 Jun 2012 04:50:32 +0000 (+0800) Subject: Bug 762783: Change dependent bugs to use POST when the url exceeds the url length... X-Git-Tag: bugzilla-4.2.2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97f5441ef1655b84f2db39a6eac10b0fb39c8c17;p=thirdparty%2Fbugzilla.git Bug 762783: Change dependent bugs to use POST when the url exceeds the url length limit r=glob, a=LpSolit --- diff --git a/template/en/default/bug/dependency-tree.html.tmpl b/template/en/default/bug/dependency-tree.html.tmpl index 10279f9b20..17f00803f3 100644 --- a/template/en/default/bug/dependency-tree.html.tmpl +++ b/template/en/default/bug/dependency-tree.html.tmpl @@ -81,11 +81,27 @@ [% END %] [% IF ids.size %] - ([% IF maxdepth -%]Up to [% maxdepth %] level[% "s" IF maxdepth > 1 %] deep | [% END -%] - view as [% terms.bug %] list - [% IF user.in_group('editbugs') && ids.size > 1 %] - | change several - [% END %]) + [%# 27 chars is the length of buglist.cgi?tweak=&bug_id=" %] + [% use_post = (ids.join(",").length > constants.CGI_URI_LIMIT - 27 ) ? 1 : 0 %] + [% IF use_post %] +
+ + [% END %] + + [% IF maxdepth -%]Up to [% maxdepth %] level[% "s" IF maxdepth > 1 %] deep | [% END -%] + [% IF use_post %] + + [% IF user.in_group('editbugs') && ids.size > 1 %] + | + [% END %] +
+ [% ELSE %] + view as [% terms.bug %] list + [% IF user.in_group('editbugs') && ids.size > 1 %] + | change several + [% END %] + [% END %] +