parent
73da3a269b
commit
f28396a2f8
1 changed files with 4 additions and 2 deletions
|
@ -458,8 +458,10 @@ You use the community supported version of the original Shaarli project, by Seba
|
|||
$tags[$caseMapping[strtolower($tag)]]++;
|
||||
}
|
||||
}
|
||||
// Sort tags by usage (most used tag first)
|
||||
arsort($tags);
|
||||
$keys = array_keys($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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue