fixed: profile photos don't obey max image size

This commit is contained in:
Graham Knop 2008-03-28 19:55:03 +00:00
parent 221d5ac0aa
commit 53bdfda753
6 changed files with 15 additions and 8 deletions

View file

@ -81,6 +81,9 @@ sub definition {
forceImageOnly=>{
defaultValue=>0
},
enforceSizeLimits => {
defaultValue => 1
},
dbDataType => {
defaultValue => "VARCHAR(22) BINARY",
},
@ -201,7 +204,12 @@ sub getValueFromPost {
}
return undef unless @files;
$storage->generateThumbnail($_) for @images; # Make a thumbnail for each filename in @images
for my $image (@images) {
$storage->generateThumbnail($image); # Make a thumbnail for each file
if ($self->get('enforceSizeLimits')) {
$storage->adjustMaxImageSize($image);
}
}
}
}
return $id;