fixing a little problem i created yesterday

This commit is contained in:
JT Smith 2006-11-08 18:53:51 +00:00
parent 899e9754b6
commit 0e7711c279
2 changed files with 15 additions and 15 deletions

View file

@ -133,6 +133,19 @@ sub getRevisionCount {
return $count;
}
#-------------------------------------------------------------------
=head2 getTagCount ( )
Returns the number of tags that have been attached to this asset. Think of it sort of like an absolute revision count, rather than counting the number of actual edits, we're counting the number of tags opened against this asset to be edited.
=cut
sub getTagCount {
my $self = shift;
my ($count) = $self->session->db->quickArray("select count(distinct(tagId)) from assetData where assetId=?", [$self->getId]);
return $count;
}
#-------------------------------------------------------------------

View file

@ -204,29 +204,16 @@ sub getOpenTags {
=head2 getRevisionCount ( )
Returns the number of revisions for this asset.
Returns the number of revisions for this tag.
=cut
sub getRevisionCount {
my $self = shift;
my ($count) = $self->session->db->quickArray("select count(*) from assetData where assetId=?", [$self->getId]);
my ($count) = $self->session->db->quickArray("select count(*) from assetData where tagId=?", [$self->getId]);
return $count;
}
#-------------------------------------------------------------------
=head2 getTagCount ( )
Returns the number of tags that have been attached to this asset. Think of it sort of like an absolute revision count, rather than counting the number of actual edits, we're counting the number of tags opened against this asset to be edited.
=cut
sub getTagCount {
my $self = shift;
my ($count) = $self->session->db->quickArray("select count(distinct(tagId)) from assetData where assetId=?", [$self->getId]);
return $count;
}
#-------------------------------------------------------------------