diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 5e82ad2bc..5d6fa3f5b 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -13,6 +13,7 @@ - fix: File user profile fields didn't link to the file - fix: SQL Reports only work on MySQL databases - More complete error messages from spectre + - fix: Wiki uploads didn't obey image and thumbnail size 7.4.8 - fix: Syndicated Content doesn't display all items with multiple feeds in interleaved mode diff --git a/lib/WebGUI/Asset/WikiPage.pm b/lib/WebGUI/Asset/WikiPage.pm index 5154da906..afe80b38b 100644 --- a/lib/WebGUI/Asset/WikiPage.pm +++ b/lib/WebGUI/Asset/WikiPage.pm @@ -227,17 +227,21 @@ sub processPropertiesFromFormPost { my $self = shift; $self->SUPER::processPropertiesFromFormPost(@_); my $actionTaken = ($self->session->form->process("assetId") eq "new") ? "Created" : "Edited"; - - $self->update({ groupIdView => $self->getWiki->get('groupIdView'), - groupIdEdit => $self->getWiki->get('groupToAdminister'), + my $wiki = $self->getWiki; + $self->update({ groupIdView => $wiki->get('groupIdView'), + groupIdEdit => $wiki->get('groupToAdminister'), actionTakenBy => $self->session->user->userId, actionTaken => $actionTaken, }); - if ($self->getWiki->canAdminister) { + if ($wiki->canAdminister) { $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 my @attachments = $self->session->form->param("attachments"); my @tags = (); @@ -252,6 +256,7 @@ sub processPropertiesFromFormPost { groupIdView => $self->get("groupIdView"), }); } + $asset->applyConstraints($options); push(@tags, $asset->get("tagId")); $asset->setVersionTag($self->get("tagId")); }