Make sure that keywords are always returned in alphabetical order in the WikiMaster byKeyword view.

This commit is contained in:
Colin Kuskie 2010-08-09 19:27:45 -07:00
parent b5ef9fc9e7
commit b8917d4e57
2 changed files with 18 additions and 14 deletions

View file

@ -552,7 +552,11 @@ sub getKeywordHierarchy {
my $datum = {
title => $keyword, ##Note, same as keyword
url => $self->getUrl('func=byKeyword;keyword='.$keyword),
descendants => scalar @{ $assetKeyword->getMatchingAssets( { startAsset => $self, keyword => $keyword, }) },
descendants => scalar @{ $assetKeyword->getMatchingAssets( {
startAsset => $self,
keyword => $keyword,
sortOrder => 'Alphabetically',
}) },
};
##Prevent recursion if seen again
if (! $seen->{$keyword}++) {