wiki images didn't obey iamge and thumb sizes

This commit is contained in:
Graham Knop 2007-10-05 16:23:55 +00:00
parent 6c5453cf9b
commit 7ab7b97c5e
2 changed files with 10 additions and 4 deletions

View file

@ -13,6 +13,7 @@
- fix: File user profile fields didn't link to the file - fix: File user profile fields didn't link to the file
- fix: SQL Reports only work on MySQL databases - fix: SQL Reports only work on MySQL databases
- More complete error messages from spectre - More complete error messages from spectre
- fix: Wiki uploads didn't obey image and thumbnail size
7.4.8 7.4.8
- fix: Syndicated Content doesn't display all items with multiple feeds in interleaved mode - fix: Syndicated Content doesn't display all items with multiple feeds in interleaved mode

View file

@ -227,17 +227,21 @@ sub processPropertiesFromFormPost {
my $self = shift; my $self = shift;
$self->SUPER::processPropertiesFromFormPost(@_); $self->SUPER::processPropertiesFromFormPost(@_);
my $actionTaken = ($self->session->form->process("assetId") eq "new") ? "Created" : "Edited"; my $actionTaken = ($self->session->form->process("assetId") eq "new") ? "Created" : "Edited";
my $wiki = $self->getWiki;
$self->update({ groupIdView => $self->getWiki->get('groupIdView'), $self->update({ groupIdView => $wiki->get('groupIdView'),
groupIdEdit => $self->getWiki->get('groupToAdminister'), groupIdEdit => $wiki->get('groupToAdminister'),
actionTakenBy => $self->session->user->userId, actionTakenBy => $self->session->user->userId,
actionTaken => $actionTaken, actionTaken => $actionTaken,
}); });
if ($self->getWiki->canAdminister) { if ($wiki->canAdminister) {
$self->update({isProtected => $self->session->form("isProtected")}); $self->update({isProtected => $self->session->form("isProtected")});
} }
my $options = {
maxImageSize => $wiki->get('maxImageSize'),
thumbnailSize => $wiki->get('thumbnailSize'),
};
# deal with attachments from the attachments form control # deal with attachments from the attachments form control
my @attachments = $self->session->form->param("attachments"); my @attachments = $self->session->form->param("attachments");
my @tags = (); my @tags = ();
@ -252,6 +256,7 @@ sub processPropertiesFromFormPost {
groupIdView => $self->get("groupIdView"), groupIdView => $self->get("groupIdView"),
}); });
} }
$asset->applyConstraints($options);
push(@tags, $asset->get("tagId")); push(@tags, $asset->get("tagId"));
$asset->setVersionTag($self->get("tagId")); $asset->setVersionTag($self->get("tagId"));
} }