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
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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