From 6286f2e31d6d2ed6a8752180a8925a51f22b84d7 Mon Sep 17 00:00:00 2001 From: Yung Han Khoe Date: Mon, 16 Feb 2009 17:06:06 +0000 Subject: [PATCH] fixing Matrix sort by updated --- lib/WebGUI/Asset/Wobject/Matrix.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/Asset/Wobject/Matrix.pm b/lib/WebGUI/Asset/Wobject/Matrix.pm index 9cf1dc9d3..ee9224368 100644 --- a/lib/WebGUI/Asset/Wobject/Matrix.pm +++ b/lib/WebGUI/Asset/Wobject/Matrix.pm @@ -101,7 +101,7 @@ sub definition { score => $i18n->get('sort by score label'), title => $i18n->get('sort alpha numeric label'), lineage => $i18n->get('sort by asset rank label'), - revisionDate => $i18n->get('sort by last updated label'), + lastUpdated => $i18n->get('sort by last updated label'), }, defaultValue =>"score", hoverHelp =>$i18n->get('default sort description'), @@ -516,7 +516,8 @@ sub view { my @lastUpdatedListings = @{ $self->getLineage(['descendants'], { includeOnlyClasses => ['WebGUI::Asset::MatrixListing'], - orderByClause => "revisionDate desc", + joinClass => "WebGUI::Asset::MatrixListing", + orderByClause => "lastUpdated desc", limit => 5, returnObjects => 1, }) }; @@ -524,7 +525,7 @@ sub view { push (@{ $var->{last_updated_loop} }, { url => $lastUpdatedListing->getUrl, name => $lastUpdatedListing->get('title'), - lastUpdated => $self->session->datetime->epochToHuman($lastUpdatedListing->get('revisionDate'),"%z") + lastUpdated => $self->session->datetime->epochToHuman($lastUpdatedListing->get('lastUpdated'),"%z") }); } $var->{lastUpdated_sortButton} = "
";