diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 84239bb39..4b9733681 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.5.14 + - fixed: Rich editor collateral image uploader is broken - fixed: ems 2.0: tickets get created as badges also - fixed: Non-admin users can now add Gallery assets - fixed: Thingy Data now retains File and Images if they aren't explicitly deleted diff --git a/lib/WebGUI/Form/HTMLArea.pm b/lib/WebGUI/Form/HTMLArea.pm index a82c65b58..7d4895081 100644 --- a/lib/WebGUI/Form/HTMLArea.pm +++ b/lib/WebGUI/Form/HTMLArea.pm @@ -464,9 +464,9 @@ sub www_addImageSave { # check if user can edit the current asset return $session->privilege->insufficient('bare') unless $base->canEdit; - #my $imageId = WebGUI::Form::Image->create($session); - my $imageId = WebGUI::Form::Image->new($session,{name => 'filename'})->getDefaultValue; - my $imageObj = WebGUI::Storage::Image->get($session, $imageId); + my $imageForm = WebGUI::Form::Image->new($session,{name => 'filename'}); + $imageForm->set('value', $imageForm->getValue); + my $imageObj = $imageForm->getStorageLocation; ##This is a hack. It should use the WebGUI::Form::File API to insulate ##us from future form name changes. my $filename = $imageObj->getFiles->[0];