fixed: loginBox macro can no longer return the user to the logout page, logging them out

This commit is contained in:
Doug Bell 2008-08-19 20:39:43 +00:00
parent 27a76cd9a3
commit 57b8cc4bae
11 changed files with 78 additions and 123 deletions

View file

@ -109,28 +109,21 @@ C<options> is a hash reference of options and is currently not used.
sub applyConstraints {
my $self = shift;
my $options = shift;
my $gallery = $self->getGallery;
# Update the asset's size and make a thumbnail
my $maxImageSize = $gallery->get("imageViewSize")
my $maxImageSize = $self->getGallery->get("imageViewSize")
|| $self->session->setting->get("maxImageSize");
my $thumbnailSize = $self->getGallery->get("imageThumbnailSize")
|| $self->session->setting->get("thumbnailSize");
my $parameters = $self->get("parameters");
my $storage = $self->getStorageLocation;
my $file = $self->get("filename");
# Make resolutions before fixing image, so that we can get higher quality
# resolutions
$self->makeResolutions;
# adjust density before size, so that the dimensions won't change
$storage->resize( $file, undef, undef, $gallery->get( 'imageDensity' ) );
$storage->adjustMaxImageSize($file, $maxImageSize);
$self->generateThumbnail;
$self->setSize;
$self->makeResolutions;
$self->updateExifDataFromFile;
$self->SUPER::applyConstraints( $options );
}
#-------------------------------------------------------------------
@ -368,7 +361,7 @@ sub makeResolutions {
}
my $newFilename = $res . ".jpg";
$storage->copyFile( $self->get("filename"), $newFilename );
$storage->resize( $newFilename, $res, undef, $self->getGallery->get( 'imageDensity' ) );
$storage->resize( $newFilename, $res );
}
}