From 40d1751913de63191186401e2271836ee3e01f51 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 20 Sep 2007 11:15:44 +0000 Subject: [PATCH] fix CS sorting by rating --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/Collaboration.pm | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index ea7504056..e9247d3e5 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -17,6 +17,7 @@ - fix: Data Form tab delimited export doesn't obey field order - fix: Extra tags inserted when viewing only Wiki page - fix: incorrect links generated for Event related links + - fix: Sort Collaboration System threads correctly by rating 7.4.6 - Prevent Help index from trying to link to non-existant documentation diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm index 68a5d62ad..a781ce84f 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm @@ -938,6 +938,10 @@ sub getThreadsPaginator { } $sortBy ||= "dateUpdated"; $sortOrder ||= "desc"; + # Sort by the thread rating instead of the post rating. other places don't care about threads. + if ($sortBy eq 'rating') { + $sortBy = 'threadRating'; + } my $sql = " select