removed PHP 5.3 closure in favor for a regular class method, thought LDAP plugins still require 5.3

This commit is contained in:
Ralf Becker 2013-06-18 14:51:27 +00:00
parent 0ccee6fb35
commit 8f9ec70e8d

View File

@ -420,17 +420,19 @@ class emailadmin_bo extends so_sql
{
if ($data) $retData += $data;
}
uksort($retData, function($a, $b) {
uksort($retData, array(__CLASS__, 'smtp_sort'));
return $retData;
}
static function smtp_sort($a, $b)
{
static $prio = array( // not explicitly mentioned get 0
'emailadmin_smtp' => 9,
'emailadmin_smtp_sql' => 8,
'smtpplesk' => -1,
);
return (int)$prio[$b] - (int)$prio[$a];
});
return $retData;
}
/**
* Get a list of supported IMAP servers
*
@ -449,7 +451,12 @@ class emailadmin_bo extends so_sql
{
if ($data) $retData += $data;
}
uksort($retData, function($a, $b) {
uksort($retData, array(__CLASS__, 'imap_sort'));
return $retData;
}
static function imap_sort($a, $b)
{
static $prio = array( // not explicitly mentioned get 0
'defaultimap' => 9,
'managementserver_imap' => 8,
@ -458,8 +465,6 @@ class emailadmin_bo extends so_sql
'pleskimap' => -1,
);
return (int)$prio[$b] - (int)$prio[$a];
});
return $retData;
}
/**