Really make the wiki sort by popularity (then lineage). Fixes bug #11537

This commit is contained in:
Colin Kuskie 2010-05-02 01:17:56 -07:00
parent b9c2a3b0ad
commit 1c70821a6f
2 changed files with 5 additions and 4 deletions

View file

@ -13,6 +13,7 @@
- added #11498: Gallery: Automatically adjust orientation of images based on EXIF data
- fixed #11547: Default Inbox View Template Delete buttton failure
- fixed #11542: Date macro can pass in epoch values that do not pass regex checks
- fixed #11537: Wiki, sorting by most popular
7.9.3
- added #11477: No synopsis in asset now means no synopsis in search index

View file

@ -76,10 +76,10 @@ If passed in, this will override the mostPopularCount set in the object.
=cut
sub appendMostPopular {
my $self = shift;
my $var = shift;
my $limit = shift || $self->get("mostPopularCount");
foreach my $asset (@{$self->getLineage(["children"],{returnObjects=>1, limit=>$limit, includeOnlyClasses=>["WebGUI::Asset::WikiPage"]})}) {
my $self = shift;
my $var = shift;
my $limit = shift || $self->get("mostPopularCount");
foreach my $asset (@{$self->getLineage(["children"],{returnObjects=>1, limit=>$limit, includeOnlyClasses=>["WebGUI::Asset::WikiPage"], joinClass => 'WebGUI::Asset::WikiPage', orderByClause => 'WikiPage.views DESC'})}) {
if (defined $asset) {
push(@{$var->{mostPopular}}, {
title=>$asset->getTitle,