]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 560215: maxattachmentsize = 0 means that you cannot attach any file to bugs
authorFrédéric Buclin <LpSolit@gmail.com>
Mon, 19 Apr 2010 19:25:01 +0000 (21:25 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 19 Apr 2010 19:25:01 +0000 (21:25 +0200)
r=mkanat a=LpSolit

template/en/default/admin/params/attachment.html.tmpl
template/en/default/attachment/list.html.tmpl
template/en/default/bug/create/create.html.tmpl

index 879aa65b14a4b56c51d9f118b77c05f534ed817a..e6f6cb778d43048bcce52ef1ca2501c2076d3df8 100644 (file)
@@ -66,9 +66,8 @@
 
   maxattachmentsize => "The maximum size (in kilobytes) of attachments. " _
                        "$terms.Bugzilla will not accept attachments greater than this number " _
-                       "of kilobytes in size. To accept attachments of any size " _
-                       "(subject to the limitations of your server software), set this " _
-                       "value to zero.",
+                       "of kilobytes in size. Setting this parameter to 0 will prevent " _
+                       "attaching files to ${terms.bugs}.",
 
   maxlocalattachment => "The maximum size (in megabytes) of attachments identified by " _
                         "the user as 'Big Files' to be stored locally on the webserver. " _
index 53f20f2365228e5842d5258f007615c24e79923d..89eef183692846ca391bd4bc0e247b435be1c449 100644 (file)
@@ -19,6 +19,8 @@
   #                 Frédéric Buclin <LpSolit@gmail.com>
   #%]
 
+[% RETURN UNLESS attachments.size || Param("maxattachmentsize") %]
+
 <script type="text/javascript">
 <!--
 function toggle_display(link) {
@@ -155,8 +157,10 @@ function toggle_display(link) {
           [% END %]
         </span>
       [% END %]
-      <a href="attachment.cgi?bugid=[% bugid %]&amp;action=enter">Add an attachment</a>
-      (proposed patch, testcase, etc.)
+      [% IF Param("maxattachmentsize") %]
+        <a href="attachment.cgi?bugid=[% bugid %]&amp;action=enter">Add an attachment</a>
+        (proposed patch, testcase, etc.)
+      [% END %]
     </td>
   </tr>
 </table>
index 5db1eddf3e3e8130294fc941508f959c4a1a66b5..e983b611b81c0b58329c621c2f6861b58cbf86b6 100644 (file)
@@ -548,6 +548,7 @@ TUI_hide_default('expert_fields');
     </tr>
   [% END %]
 
+  [% IF Param("maxattachmentsize") %]
   <tr>
     <th>Attachment:</th>
     <td colspan="3">
@@ -582,6 +583,7 @@ TUI_hide_default('expert_fields');
       </script>
     </td>
   </tr>
+  [% END %]
 </tbody>
 
 <tbody class="expert_fields">