From a13fee07a0a9548c46a7b9209bc19748a120cbce Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Fri, 6 Aug 2010 17:50:28 -0500 Subject: [PATCH] add getRevisionDates method --- lib/WebGUI/AssetVersioning.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/WebGUI/AssetVersioning.pm b/lib/WebGUI/AssetVersioning.pm index eeefe9f3b..c628265ce 100644 --- a/lib/WebGUI/AssetVersioning.pm +++ b/lib/WebGUI/AssetVersioning.pm @@ -245,6 +245,22 @@ sub getRevisionCount { #------------------------------------------------------------------- +=head2 getRevisionDates ( [ status ] ) + +Return an arrayref of all the revision dates for this asset, sorted in +descending order (most recent first). + +=cut + +sub getRevisionDates { + my $self = shift; + return $self->session->db->buildArrayRef( + "select revisionDate from assetData where assetId=? order by revisionDate desc", + [$self->getId], + ); +} +#------------------------------------------------------------------- + =head2 getRevisions ( [ status ] ) Returns an array reference of the revision objects of this asset, sorted by revision date in descending