Fix a bug where WebGUI::Storage::Image->copy does not return

an object of the same class, when no default object is passed.
Added a bunch of tests.
This commit is contained in:
Colin Kuskie 2007-07-23 04:53:09 +00:00
parent c3951afc11
commit a83702f2ed
2 changed files with 46 additions and 5 deletions

View file

@ -88,7 +88,7 @@ Optionally pass a storage object to copy the files to.
sub copy {
my $self = shift;
my $newStorage = shift;
my $newStorage = shift || WebGUI::Storage::Image->create($self->session);
# Storage::Image->getFiles excludes thumbnails from the filelist and we want to copy the thumbnails
my $filelist = $self->SUPER::getFiles(1);