fixed: Rich editor collateral image uploader is broken

This commit is contained in:
Graham Knop 2008-06-25 20:02:51 +00:00
parent 1b8567abb2
commit c0cd862362
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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];