From 97f5441ef1655b84f2db39a6eac10b0fb39c8c17 Mon Sep 17 00:00:00 2001 From: Simon Green Date: Fri, 29 Jun 2012 12:50:32 +0800 Subject: [PATCH] Bug 762783: Change dependent bugs to use POST when the url exceeds the url length limit r=glob, a=LpSolit --- .../en/default/bug/dependency-tree.html.tmpl | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) 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 %] + -- 2.47.2