parent
73da3a269b
commit
f28396a2f8
1 changed files with 4 additions and 2 deletions
|
@ -458,8 +458,10 @@ public function linksCountPerTag($filteringTags = [], $visibility = 'all')
|
||||||
$tags[$caseMapping[strtolower($tag)]]++;
|
$tags[$caseMapping[strtolower($tag)]]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Sort tags by usage (most used tag first)
|
$keys = array_keys($tags);
|
||||||
arsort($tags);
|
$tmpTags = array_combine($keys, $keys);
|
||||||
|
// We sort tags by DESC occurrences, then ASC alphabetically for equal values.
|
||||||
|
array_multisort($tags, SORT_DESC, $tmpTags, SORT_ASC, $tags);
|
||||||
return $tags;
|
return $tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue