Really make the wiki sort by popularity (then lineage). Fixes bug #11537
This commit is contained in:
parent
b9c2a3b0ad
commit
1c70821a6f
2 changed files with 5 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue