forward port of File/Image - Storage/Storage::Image object alignment fix
This commit is contained in:
parent
4de39b7fe5
commit
522d87fed2
2 changed files with 21 additions and 8 deletions
|
|
@ -279,7 +279,7 @@ sub processPropertiesFromFormPost {
|
|||
$data{title} = $filename unless ($session->form->process("title"));
|
||||
$data{menuTitle} = $filename unless ($session->form->process("menuTitle"));
|
||||
$data{url} = $self->getParent->get('url').'/'.$filename unless ($session->form->process("url"));
|
||||
$self->{_storageLocation} = $storage;
|
||||
$self->setStorageLocation($storage);
|
||||
$self->update(\%data);
|
||||
}
|
||||
}
|
||||
|
|
@ -336,11 +336,16 @@ sub setSize {
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
sub setStorageLocation {
|
||||
my $self = shift;
|
||||
if ($self->get("storageId") eq "") {
|
||||
my $self = shift;
|
||||
my $storage = shift;
|
||||
if (defined $storage) {
|
||||
$self->{_storageLocation} = $storage;
|
||||
}
|
||||
elsif ($self->get("storageId") eq "") {
|
||||
$self->{_storageLocation} = WebGUI::Storage->create($self->session);
|
||||
$self->update({storageId=>$self->{_storageLocation}->getId});
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$self->{_storageLocation} = WebGUI::Storage->get($self->session,$self->get("storageId"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue