Deprecated WebGUI::Storage::Image. WebGUI::Storage can now do everything

WebGUI::Storage::Image can do.
This commit is contained in:
JT Smith 2008-11-26 16:06:18 +00:00
parent 2b3e88fd63
commit ee84cc7611
34 changed files with 399 additions and 470 deletions

View file

@ -20,7 +20,7 @@ use Carp qw(croak);
use WebGUI::International;
use WebGUI::Asset::Template;
use WebGUI::Form;
use WebGUI::Storage::Image;
use WebGUI::Storage;
use Storable;
use base 'WebGUI::Asset';
@ -1214,10 +1214,10 @@ 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->create($self->session);
$self->update({storageId=>$self->{_storageLocation}->getId});
} else {
$self->{_storageLocation} = WebGUI::Storage::Image->get($self->session,$self->get("storageId"));
$self->{_storageLocation} = WebGUI::Storage->get($self->session,$self->get("storageId"));
}
}
return $self->{_storageLocation};
@ -1702,7 +1702,7 @@ sub purge {
my $self = shift;
my $sth = $self->session->db->read("select storageId from Event where assetId=?",[$self->getId]);
while (my ($storageId) = $sth->array) {
my $storage = WebGUI::Storage::Image->get($self->session,$storageId);
my $storage = WebGUI::Storage->get($self->session,$storageId);
$storage->delete if defined $storage;
}
$sth->finish;