removed start/end dates from assets in favor of workflows that can do the same thing only better

This commit is contained in:
JT Smith 2006-03-01 18:02:36 +00:00
parent 8b6198220d
commit 103969816e
25 changed files with 316 additions and 251 deletions

View file

@ -89,10 +89,8 @@ Commits all assets edited under a version tag, and then sets the version tag to
sub commit {
my $self = shift;
my $tagId = $self->getId;
my $sth = $self->session->db->read("select asset.assetId,asset.className,assetData.revisionDate from assetData left join asset on asset.assetId=assetData.assetId where assetData.tagId=?", [$tagId]);
while (my ($id,$class,$version) = $sth->array) {
WebGUI::Asset->new($self->session,$id,$class,$version)->commit;
foreach my $asset (@{$self->getAssets}) {
$asset->commit;
}
$self->{_data}{isCommited} = 1;
$self->{_data}{commitedBy} = $self->session->user->userId;
@ -118,6 +116,24 @@ sub get {
#-------------------------------------------------------------------
=head2 getAssets ( )
Returns a list of asset objects that are part of this version tag.
=cut
sub getAssets {
my $self = shift;
my @assets = ();
my $sth = $self->session->db->read("select asset.assetId,asset.className,assetData.revisionDate from assetData left join asset on asset.assetId=assetData.assetId where assetData.tagId=?", [$self->getId]);
while (my ($id,$class,$version) = $sth->array) {
push(@assets, WebGUI::Asset->new($self->session,$id,$class,$version));
}
return \@assets;
}
#-------------------------------------------------------------------
=head2 getId ( )
Returns the ID of this version tag.