forward port of double-thumbnail bug. Image was inheriting a Storage object from File, and needed a Storage::Image object
This commit is contained in:
parent
0db9d14a94
commit
7abd54eb94
4 changed files with 48 additions and 7 deletions
|
|
@ -202,6 +202,23 @@ sub getIcon {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getStorageFromPost
|
||||
|
||||
We have to wrap this operation because WebGUI::Asset::File::Image calls SUPER processPropertiesFormFormPost,
|
||||
which gives it the wrong type of Storage object.
|
||||
|
||||
=cut
|
||||
|
||||
sub getStorageFromPost {
|
||||
my $self = shift;
|
||||
my $storageId = shift;
|
||||
my $fileStorageId = WebGUI::Form::File->new($self->session, {name => 'newFile', value=>$storageId })->getValueFromPost;
|
||||
return WebGUI::Storage->get($self->session, $fileStorageId);
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
sub getStorageLocation {
|
||||
|
|
@ -265,8 +282,7 @@ sub processPropertiesFromFormPost {
|
|||
}
|
||||
|
||||
#Pass in the storage Id to prevent another one from being created.
|
||||
my $fileStorageId = WebGUI::Form::File->new($session, {name => 'newFile', value=>$storageId })->getValueFromPost;
|
||||
my $storage = WebGUI::Storage->get($session, $fileStorageId);
|
||||
my $storage = $self->getStorageFromPost($storageId);
|
||||
|
||||
if (defined $storage) {
|
||||
$storage->setPrivileges($self->get('ownerUserId'), $self->get('groupIdView'), $self->get('groupIdEdit'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue