From dcc9dd08a5bd51e941e89a7334c5037d1b8be1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Peters?= Date: Thu, 5 Mar 2020 07:16:26 +0100 Subject: [PATCH] Aliases in SoGO will be sorted this way (#3386) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Aliases in SoGO will be sorted this way The sender drop down list when writing a new email in SoGO will be sorted with this patch. Currently they are in a pretty random order. I had to manually drop and recreate the view, not sure how to trigger this in Mailcow. * Update init_db.inc.php Co-authored-by: André Peters --- data/web/inc/init_db.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/web/inc/init_db.inc.php b/data/web/inc/init_db.inc.php index 3efb7318..ff4edfce 100644 --- a/data/web/inc/init_db.inc.php +++ b/data/web/inc/init_db.inc.php @@ -3,7 +3,7 @@ function init_db_schema() { try { global $pdo; - $db_version = "16022020_1804"; + $db_version = "05032020_0715"; $stmt = $pdo->query("SHOW TABLES LIKE 'versions'"); $num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC)); @@ -16,7 +16,7 @@ function init_db_schema() { $views = array( "grouped_mail_aliases" => "CREATE VIEW grouped_mail_aliases (username, aliases) AS - SELECT goto, IFNULL(GROUP_CONCAT(address SEPARATOR ' '), '') AS address FROM alias + SELECT goto, IFNULL(GROUP_CONCAT(address ORDER BY address SEPARATOR ' '), '') AS address FROM alias WHERE address!=goto AND active = '1' AND sogo_visible = '1'