]> git.plutz.net Git - serve0/blobdiff - widgets.sh
Bugfix: keep tag order
[serve0] / widgets.sh
index 35b485a68c122ec93b4abd30f1f7a70d8a06f913..4e93629165dedb3386802eb692e8bd33399917ca 100755 (executable)
@@ -4,6 +4,7 @@
 include_widgets="$0"
 
 . "$_EXEC/cgilite/storage.sh"
+. "$_EXEC/db_meta.sh"
 
 w_refuri="$(URL "$PATH_INFO")?$(HTML "$QUERY_STRING")"
 
@@ -19,7 +20,7 @@ if [ ! -s "$c_tags" -o ! -s "$c_tagcategories" ] \
       s;^.*\ttags=([^\t]*)\t.*$;\1;;
       s;,;\n;g;
     ' \
-    | sort |uniq -c |sed -E 's;^ *[0-9]+ ;;;' |sort -rn \
+    | sort |uniq -c |sort -rn |sed -E 's;^ *[0-9]+ ;;;' \
     | UNSTRING | HTML \
     | sed -E 's;&#x0A\;;\n;g; s;\n+;\n;g;'
   )"