aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-08-13 21:32:15 +0000
committerlpsolit%gmail.com <>2009-08-13 21:32:15 +0000
commit6eec197b4ad9d396b6c33c5012155608ae4bd961 (patch)
treeaed084eef9a536fb859f1d68684b4dd554293bf8 /Bugzilla
parentBug 458627: "My Requests" link no longer displayed in the footer of some page... (diff)
downloadbugzilla-6eec197b4ad9d396b6c33c5012155608ae4bd961.tar.gz
bugzilla-6eec197b4ad9d396b6c33c5012155608ae4bd961.tar.bz2
bugzilla-6eec197b4ad9d396b6c33c5012155608ae4bd961.zip
Bug 480986: The BMP -> PNG conversion tool for new attachments should be an extension - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Attachment.pm18
-rw-r--r--Bugzilla/Config/Attachment.pm7
-rw-r--r--Bugzilla/Config/Common.pm11
-rw-r--r--Bugzilla/Install/Requirements.pm6
4 files changed, 1 insertions, 41 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index 5ba62e5e5..b1aecd5b0 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -568,24 +568,6 @@ sub _check_data {
return $data if ref $data;
$data || ThrowUserError('zero_length_file');
-
- # This should go away, see bug 480986.
- # Windows screenshots are usually uncompressed BMP files which
- # 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 (Bugzilla->params->{'convert_uncompressed_images'}
- && $params->{mimetype} eq 'image/bmp')
- {
- require Image::Magick;
- my $img = Image::Magick->new(magick=>'bmp');
- $img->BlobToImage($data);
- $img->set(magick=>'png');
- my $imgdata = $img->ImageToBlob();
- $data = $imgdata;
- $params->{mimetype} = 'image/png';
- }
-
# Make sure the attachment does not exceed the maximum permitted size.
my $len = length($data);
my $max_size = $params->{store_in_file} ? Bugzilla->params->{'maxlocalattachment'} * 1048576
diff --git a/Bugzilla/Config/Attachment.pm b/Bugzilla/Config/Attachment.pm
index f22c01d95..3468f084c 100644
--- a/Bugzilla/Config/Attachment.pm
+++ b/Bugzilla/Config/Attachment.pm
@@ -84,13 +84,6 @@ sub get_param_list {
type => 't',
default => '0',
checker => \&check_numeric
- },
-
- {
- name => 'convert_uncompressed_images',
- type => 'b',
- default => 0,
- checker => \&check_image_converter
} );
return @param_list;
}
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm
index b285b3bc9..cb95a2f8d 100644
--- a/Bugzilla/Config/Common.pm
+++ b/Bugzilla/Config/Common.pm
@@ -47,7 +47,7 @@ use base qw(Exporter);
qw(check_multi check_numeric check_regexp check_url check_group
check_sslbase check_priority check_severity check_platform
check_opsys check_shadowdb check_urlbase check_webdotbase
- check_netmask check_user_verify_class check_image_converter
+ check_netmask check_user_verify_class
check_mail_delivery_method check_notification check_utf8
check_bug_status check_smtp_auth check_theschwartz_available
check_maxattachmentsize
@@ -293,15 +293,6 @@ sub check_user_verify_class {
return "";
}
-sub check_image_converter {
- my ($value, $hash) = @_;
- if ($value == 1){
- eval "require Image::Magick";
- return "Error requiring Image::Magick: '$@'" if $@;
- }
- return "";
-}
-
sub check_mail_delivery_method {
my $check = check_multi(@_);
return $check if $check;
diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm
index 0d013f62f..dbcef03bf 100644
--- a/Bugzilla/Install/Requirements.pm
+++ b/Bugzilla/Install/Requirements.pm
@@ -204,12 +204,6 @@ sub OPTIONAL_MODULES {
feature => ['patch_viewer'],
},
{
- package => 'PerlMagick',
- module => 'Image::Magick',
- version => 0,
- feature => ['compress_bmps'],
- },
- {
package => 'perl-ldap',
module => 'Net::LDAP',
version => 0,