summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-12-10 19:32:27 +0100
committerlpsolit%gmail.com <>2008-12-10 19:32:27 +0100
commit38f2c4266697633a1d24bbbcac279c6332ac17b3 (patch)
treed4f328a4ae77e88f94b1a25dfa159f6b33cf9962 /Bugzilla
parente087aa6018bab95f403c836d12b30bb5ed39a626 (diff)
downloadbugzilla-38f2c4266697633a1d24bbbcac279c6332ac17b3.tar.gz
bugzilla-38f2c4266697633a1d24bbbcac279c6332ac17b3.tar.xz
Bug 399074: Remove the 'maxpatchsize' parameter - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Attachment.pm5
-rw-r--r--Bugzilla/Config/Attachment.pm6
2 files changed, 2 insertions, 9 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index 3582ffb23..4aa74dcdf 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -474,9 +474,7 @@ sub _validate_filename {
sub _validate_data {
my ($throw_error, $hr_vars) = @_;
my $cgi = Bugzilla->cgi;
- my $maxsize = $cgi->param('ispatch') ? Bugzilla->params->{'maxpatchsize'}
- : Bugzilla->params->{'maxattachmentsize'};
- $maxsize *= 1024; # Convert from K
+
my $fh;
# Skip uploading into a local variable if the user wants to upload huge
# attachments into local files.
@@ -514,6 +512,7 @@ sub _validate_data {
}
# Make sure the attachment does not exceed the maximum permitted size
+ my $maxsize = Bugzilla->params->{'maxattachmentsize'} * 1024; # Convert from K
my $len = $data ? length($data) : 0;
if ($maxsize && $len > $maxsize) {
my $vars = { filesize => sprintf("%.0f", $len/1024) };
diff --git a/Bugzilla/Config/Attachment.pm b/Bugzilla/Config/Attachment.pm
index bbaaaa63d..72ad29a2d 100644
--- a/Bugzilla/Config/Attachment.pm
+++ b/Bugzilla/Config/Attachment.pm
@@ -50,12 +50,6 @@ sub get_param_list {
type => 'b',
default => 0
},
- {
- name => 'maxpatchsize',
- type => 't',
- default => '1000',
- checker => \&check_numeric
- },
{
name => 'maxattachmentsize',