Add storage locations to package data for a Story. With tests.

This commit is contained in:
Colin Kuskie 2009-04-13 17:56:44 +00:00
parent 9f5a82cec8
commit 4768a8687e
2 changed files with 26 additions and 6 deletions

View file

@ -204,14 +204,18 @@ sub duplicatePhotoData {
=head2 exportAssetData ( )
See WebGUI::AssetPackage::exportAssetData() for details.
Add the storage location to the export data.
Adds all storage locations to the package data.
=cut
sub exportAssetData {
my $self = shift;
my $data = $self->next::method;
return $data;
my $exportData = $self->next::method;
PHOTO: foreach my $photo (@{ $self->getPhotoData }) {
next PHOTO unless $photo->{storageId};
push @{ $exportData->{storage} }, $photo->{storageId};
}
return $exportData;
}
#-------------------------------------------------------------------