From 482fa43f12e9e2af232b8d65e57599919c13c0b2 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 21 Oct 2013 14:06:05 +0200 Subject: [PATCH] Sort tags alphabetically (#2367) --- plugins/tasklist/tasklist.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php index 6ebddc40..9d5544cd 100644 --- a/plugins/tasklist/tasklist.php +++ b/plugins/tasklist/tasklist.php @@ -605,6 +605,10 @@ class tasklist extends rcube_plugin $rec['attachments'][$k]['classname'] = rcube_utils::file2class($attachment['mimetype'], $attachment['name']); } + if (!is_array($rec['tags'])) + $rec['tags'] = (array)$rec['tags']; + sort($rec['tags'], SORT_LOCALE_STRING); + if (in_array($rec['id'], $this->collapsed_tasks)) $rec['collapsed'] = true;