fix imap server shows smpt types and visa versa, also change case of DBMail

This commit is contained in:
Ralf Becker 2016-04-01 12:46:10 +00:00
parent d7f38ce16e
commit 0e443b720d
3 changed files with 12 additions and 11 deletions

View File

@ -27,7 +27,7 @@ class Dbmailqmailuser extends Mail\Imap
/** /**
* Label shown in EMailAdmin * Label shown in EMailAdmin
*/ */
const DESCRIPTION = 'dbmail (qmailUser Schema)'; const DESCRIPTION = 'DBMail (qmailUser Schema)';
/** /**
* Capabilities of this class (pipe-separated): default, sieve, admin, logintypeemail * Capabilities of this class (pipe-separated): default, sieve, admin, logintypeemail

View File

@ -27,7 +27,7 @@ class Dbmailuser extends Mail\Imap
/** /**
* Label shown in EMailAdmin * Label shown in EMailAdmin
*/ */
const DESCRIPTION = 'dbmail (dbmailUser Schema)'; const DESCRIPTION = 'DBMail (dbmailUser Schema)';
/** /**
* Capabilities of this class (pipe-separated): default, sieve, admin, logintypeemail * Capabilities of this class (pipe-separated): default, sieve, admin, logintypeemail

View File

@ -25,7 +25,7 @@ class Types
*/ */
static public function getSMTPServerTypes($extended=true) static public function getSMTPServerTypes($extended=true)
{ {
$retData = self::server_types(true, $extended); $retData = self::server_types(false, $extended);
foreach($GLOBALS['egw']->hooks->process(array( foreach($GLOBALS['egw']->hooks->process(array(
'location' => 'smtp_server_types', 'location' => 'smtp_server_types',
'extended' => $extended, 'extended' => $extended,
@ -35,9 +35,10 @@ class Types
} }
uksort($retData, function($a, $b) { uksort($retData, function($a, $b) {
/* static requires PHP5.6+ */ $prio = array( // not explicitly mentioned get 0 static $prio = array( // not explicitly mentioned get 0
__NAMESPACE__.'\\Smtp' => 9, 'EGroupware\\Api\\Mail\\Smtp' => 9,
__NAMESPACE__.'\\Smtp\\Sql' => 8, 'EGroupware\\Api\\Mail\\Smtp\\Sql' => 8,
'EGroupware\\Api\\Mail\\Smtp\\Ads' => 7,
); );
return (int)$prio[$b] - (int)$prio[$a]; return (int)$prio[$b] - (int)$prio[$a];
}); });
@ -54,7 +55,7 @@ class Types
*/ */
static public function getIMAPServerTypes($extended=true) static public function getIMAPServerTypes($extended=true)
{ {
$retData = self::server_types(false, $extended); $retData = self::server_types(true, $extended);
foreach($GLOBALS['egw']->hooks->process(array( foreach($GLOBALS['egw']->hooks->process(array(
'location' => 'imap_server_types', 'location' => 'imap_server_types',
'extended' => $extended, 'extended' => $extended,
@ -63,11 +64,11 @@ class Types
if ($data && $app != 'emailadmin') $retData += $data; if ($data && $app != 'emailadmin') $retData += $data;
} }
uksort($retData, function($a, $b) { uksort($retData, function($a, $b) {
/* static requires PHP5.6+ */ $prio = array( // not explicitly mentioned get 0 static $prio = array( // not explicitly mentioned get 0
__NAMESPACE__.'\\Imap' => 9, 'EGroupware\\Api\\Mail\\Imap' => 9,
'managementserver_imap' => 8, 'managementserver_imap' => 8,
__NAMESPACE__.'\\Dovecot' => 7, 'EGroupware\\Api\\Mail\\Imap\\Dovecot' => 7,
__NAMESPACE__.'\\Cyrus' => 6, 'EGroupware\\Api\\Mail\\Imap\\Cyrus' => 6,
); );
return (int)$prio[$b] - (int)$prio[$a]; return (int)$prio[$b] - (int)$prio[$a];
}); });