Skip to content

Commit

Permalink
sort tag cloud by tag name
Browse files Browse the repository at this point in the history
Fixes #195 and #189
  • Loading branch information
Klap-in committed Aug 19, 2023
1 parent bf27ea7 commit ef93eb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use dokuwiki\Extension\Event;
use dokuwiki\Utf8\PhpString;
use dokuwiki\Utf8\Sort;

/**
* Helper part of the tag plugin, allows to query and print tags
Expand Down Expand Up @@ -438,6 +439,7 @@ public function tagOccurrences($tags, $namespaces = null, $allTags = false, $isR
unset($tagOccurrences[$tag]);
}
}
Sort::ksort($tagOccurrences);
return $tagOccurrences;
}

Expand Down
2 changes: 0 additions & 2 deletions syntax/searchtags.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ private function getForm($nonsform = false)
if ($my = $this->loadHelper('tag')) {
$tags = $my->tagOccurrences(array(), NULL, true);
}
// sort tags by name ($tags is in the form $tag => $count)
ksort($tags);

// display error message when no tags were found
if (!isset($tags) || $tags == NULL) {
Expand Down

0 comments on commit ef93eb2

Please sign in to comment.