summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Attachment.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-07-04 06:26:20 +0200
committermkanat%bugzilla.org <>2006-07-04 06:26:20 +0200
commitb1f4cf8bdc4b49c02ebebbee2553202bc46ab720 (patch)
tree8dddf198fa0cb29b5cef3833ff3469f07d34fdf7 /Bugzilla/Attachment.pm
parent49979b3775108f709cefbc9190eb9c7546aace94 (diff)
downloadbugzilla-b1f4cf8bdc4b49c02ebebbee2553202bc46ab720.tar.gz
bugzilla-b1f4cf8bdc4b49c02ebebbee2553202bc46ab720.tar.xz
Bug 342869: Use Bugzilla->params everywhere except templates
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r--Bugzilla/Attachment.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index 78d326049..0ed77974f 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -413,7 +413,8 @@ sub _validate_filename {
sub _validate_data {
my ($throw_error, $hr_vars) = @_;
my $cgi = Bugzilla->cgi;
- my $maxsize = $cgi->param('ispatch') ? Param('maxpatchsize') : Param('maxattachmentsize');
+ 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
@@ -439,7 +440,7 @@ sub _validate_data {
# makes for a quick way to eat up disk space. Let's compress them.
# We do this before we check the size since the uncompressed version
# could easily be greater than maxattachmentsize.
- if (Param('convert_uncompressed_images')
+ if (Bugzilla->params->{'convert_uncompressed_images'}
&& $cgi->param('contenttype') eq 'image/bmp') {
require Image::Magick;
my $img = Image::Magick->new(magick=>'bmp');
@@ -710,7 +711,7 @@ sub insert_attachment_for_bug {
open(AH, ">$attachdir/$hash/attachment.$attachid");
binmode AH;
my $sizecount = 0;
- my $limit = (Param("maxlocalattachment") * 1048576);
+ my $limit = (Bugzilla->params->{"maxlocalattachment"} * 1048576);
while (<$fh>) {
print AH $_;
$sizecount += length($_);