Browse Source

Aliases in SoGO will be sorted this way (#3386)

* 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 <andre.peters@debinux.de>
André Peters 5 years ago
parent
commit
dcc9dd08a5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      data/web/inc/init_db.inc.php

+ 2 - 2
data/web/inc/init_db.inc.php

@@ -3,7 +3,7 @@ function init_db_schema() {
   try {
   try {
     global $pdo;
     global $pdo;
 
 
-    $db_version = "16022020_1804";
+    $db_version = "05032020_0715";
 
 
     $stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
     $stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
     $num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
     $num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
@@ -16,7 +16,7 @@ function init_db_schema() {
 
 
     $views = array(
     $views = array(
     "grouped_mail_aliases" => "CREATE VIEW grouped_mail_aliases (username, aliases) AS
     "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
       WHERE address!=goto
       AND active = '1'
       AND active = '1'
       AND sogo_visible = '1'
       AND sogo_visible = '1'