summaryrefslogtreecommitdiffstats
path: root/defparams.pl
diff options
context:
space:
mode:
authormyk%mozilla.org <>2005-07-30 09:46:39 +0200
committermyk%mozilla.org <>2005-07-30 09:46:39 +0200
commitd79c2c86ef0b69c4250642e3709f22a34fe7c8a0 (patch)
treed62dc2bd3405c4bda8ec94a65f9e29d2eabd8969 /defparams.pl
parentf55027e7a07f4cb3f74cd6c42e710e794564df3c (diff)
downloadbugzilla-d79c2c86ef0b69c4250642e3709f22a34fe7c8a0.tar.gz
bugzilla-d79c2c86ef0b69c4250642e3709f22a34fe7c8a0.tar.xz
Fix for bug 302083: automatically converts BMP files to PNG files to conserve disk space; patch by Greg Hendricks; r=myk, a=myk
Diffstat (limited to 'defparams.pl')
-rw-r--r--defparams.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/defparams.pl b/defparams.pl
index 09f2a5012..49448b9d9 100644
--- a/defparams.pl
+++ b/defparams.pl
@@ -209,6 +209,15 @@ 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_languages {
my @languages = split /[,\s]+/, trim($_[0]);
if(!scalar(@languages)) {
@@ -1291,6 +1300,16 @@ Reason: %reason%
default => '0',
checker => \&check_numeric
},
+
+ {
+ name => 'convert_uncompressed_images',
+ desc => 'If this option is on, attachments with content type image/bmp ' .
+ 'will be converted to image/png and compressed before uploading to'.
+ 'the database to conserve disk space.',
+ type => 'b',
+ default => 0,
+ checker => \&check_image_converter
+ },
{
name => 'chartgroup',