fix a bug where updating the storageId in File Type assets did not update the cached storageLocation. Also fixed the Thumbnail Macro test
This commit is contained in:
parent
332933337a
commit
2c246c06cc
6 changed files with 195 additions and 11 deletions
|
|
@ -148,11 +148,12 @@ sub getEditForm {
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
sub getStorageLocation {
|
||||
my $self = shift;
|
||||
unless (exists $self->{_storageLocation}) {
|
||||
if ($self->get("storageId") eq "") {
|
||||
$self->{_storageLocation} = WebGUI::Storage::Image->create($self->session);
|
||||
$self->{_storageLocation} = WebGUI::Storage::Image->create($self->session);
|
||||
$self->update({storageId=>$self->{_storageLocation}->getId});
|
||||
} else {
|
||||
$self->{_storageLocation} = WebGUI::Storage::Image->get($self->session,$self->get("storageId"));
|
||||
|
|
@ -222,6 +223,18 @@ sub setSize {
|
|||
return $self->SUPER::setSize($size);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
sub setStorageLocation {
|
||||
my $self = shift;
|
||||
if ($self->get("storageId") eq "") {
|
||||
$self->{_storageLocation} = WebGUI::Storage::Image->create($self->session);
|
||||
$self->update({storageId=>$self->{_storageLocation}->getId});
|
||||
} else {
|
||||
$self->{_storageLocation} = WebGUI::Storage::Image->get($self->session,$self->get("storageId"));
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
my $self = shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue