aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/LinkDB.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/LinkDB.php')
-rw-r--r--application/LinkDB.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/application/LinkDB.php b/application/LinkDB.php
index c1661d52..ce53f200 100644
--- a/application/LinkDB.php
+++ b/application/LinkDB.php
@@ -458,8 +458,10 @@ You use the community supported version of the original Shaarli project, by Seba
458 $tags[$caseMapping[strtolower($tag)]]++; 458 $tags[$caseMapping[strtolower($tag)]]++;
459 } 459 }
460 } 460 }
461 // Sort tags by usage (most used tag first) 461 $keys = array_keys($tags);
462 arsort($tags); 462 $tmpTags = array_combine($keys, $keys);
463 // We sort tags by DESC occurrences, then ASC alphabetically for equal values.
464 array_multisort($tags, SORT_DESC, $tmpTags, SORT_ASC, $tags);
463 return $tags; 465 return $tags;
464 } 466 }
465 467