Skip to content

Commit

Permalink
Use collator based sort, should respect country specific characters
Browse files Browse the repository at this point in the history
Fixes #75
  • Loading branch information
Klap-in committed Dec 24, 2023
1 parent 8094756 commit b9a84c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace dokuwiki\plugin\indexmenu;

use dokuwiki\Utf8\Sort;

class Search
{
/**
Expand Down Expand Up @@ -646,9 +648,9 @@ public function getNamespaceTitle($ns, $headpage, &$hns)
private function compareNodes($a, $b)
{
if ($this->rsort) {
return strnatcasecmp($b['sort'], $a['sort']);
return Sort::strcmp($b['sort'], $a['sort']);
} else {
return strnatcasecmp($a['sort'], $b['sort']);
return Sort::strcmp($a['sort'], $b['sort']);
}
}

Expand Down

0 comments on commit b9a84c9

Please sign in to comment.