Commit 702d4301 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 560215: maxattachmentsize = 0 means that you cannot attach any file to bugs

r=mkanat a=LpSolit
parent d26192f5
...@@ -66,9 +66,8 @@ ...@@ -66,9 +66,8 @@
maxattachmentsize => "The maximum size (in kilobytes) of attachments. " _ maxattachmentsize => "The maximum size (in kilobytes) of attachments. " _
"$terms.Bugzilla will not accept attachments greater than this number " _ "$terms.Bugzilla will not accept attachments greater than this number " _
"of kilobytes in size. To accept attachments of any size " _ "of kilobytes in size. Setting this parameter to 0 will prevent " _
"(subject to the limitations of your server software), set this " _ "attaching files to ${terms.bugs}.",
"value to zero.",
maxlocalattachment => "The maximum size (in megabytes) of attachments identified by " _ maxlocalattachment => "The maximum size (in megabytes) of attachments identified by " _
"the user as 'Big Files' to be stored locally on the webserver. " _ "the user as 'Big Files' to be stored locally on the webserver. " _
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
# Frédéric Buclin <LpSolit@gmail.com> # Frédéric Buclin <LpSolit@gmail.com>
#%] #%]
[% RETURN UNLESS attachments.size || Param("maxattachmentsize") %]
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
function toggle_display(link) { function toggle_display(link) {
...@@ -155,8 +157,10 @@ function toggle_display(link) { ...@@ -155,8 +157,10 @@ function toggle_display(link) {
[% END %] [% END %]
</span> </span>
[% END %] [% END %]
<a href="attachment.cgi?bugid=[% bugid %]&amp;action=enter">Add an attachment</a> [% IF Param("maxattachmentsize") %]
(proposed patch, testcase, etc.) <a href="attachment.cgi?bugid=[% bugid %]&amp;action=enter">Add an attachment</a>
(proposed patch, testcase, etc.)
[% END %]
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -548,6 +548,7 @@ TUI_hide_default('expert_fields'); ...@@ -548,6 +548,7 @@ TUI_hide_default('expert_fields');
</tr> </tr>
[% END %] [% END %]
[% IF Param("maxattachmentsize") %]
<tr> <tr>
<th>Attachment:</th> <th>Attachment:</th>
<td colspan="3"> <td colspan="3">
...@@ -582,6 +583,7 @@ TUI_hide_default('expert_fields'); ...@@ -582,6 +583,7 @@ TUI_hide_default('expert_fields');
</script> </script>
</td> </td>
</tr> </tr>
[% END %]
</tbody> </tbody>
<tbody class="expert_fields"> <tbody class="expert_fields">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment