Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Reviews Sort?

Quote Reply
Reviews Sort?
On the page that lists all the reviews (review_search_results) the sort order is Date Desc, but on the Detailed pages it pulls them in Date ASC. How do I snyc these up? Ideally I'd like them both to show the latest review first...
Quote Reply
Re: [pshadow] Reviews Sort? In reply to
Here's a patch to admin/Links/Utils.pm that will sort it the same way (it'll be included in the next release):
Code:
diff -u -r1.45 Utils.pm
--- Utils.pm 1 Oct 2005 02:05:49 -0000 1.45
+++ Utils.pm 29 Nov 2005 00:29:35 -0000
@@ -91,6 +91,9 @@
$id = $vars->{ID};
}
my $reviews = $DB->table('Reviews');
+ if ($CFG->{review_sort_by}) {
+ $reviews->select_options("ORDER BY $CFG->{review_sort_by} DESC");
+ }
if ($max and $max =~ /^\d+$/) {
$reviews->select_options("LIMIT $max");
}

Adrian