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>
master
André Peters 2020-03-05 07:16:26 +01:00 committed by GitHub
parent b1242259e7
commit dcc9dd08a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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'