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) {
static $prio = array( // not explicitly mentioned get 0
'emailadmin_smtp' => 9,
'emailadmin_smtp_sql' => 8,
'smtpplesk' => -1,
);
return (int)$prio[$b] - (int)$prio[$a];
});
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];
}
/**
* Get a list of supported IMAP servers
*
@ -449,19 +451,22 @@ class emailadmin_bo extends so_sql
{
if ($data) $retData += $data;
}
uksort($retData, function($a, $b) {
static $prio = array( // not explicitly mentioned get 0
'defaultimap' => 9,
'managementserver_imap' => 8,
'emailadmin_dovecot' => 7,
'cyrusimap' => 6,
'pleskimap' => -1,
);
return (int)$prio[$b] - (int)$prio[$a];
});
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,
'emailadmin_dovecot' => 7,
'cyrusimap' => 6,
'pleskimap' => -1,
);
return (int)$prio[$b] - (int)$prio[$a];
}
/**
* unset certain CachedObjects for the given profile id, unsets the profile for default ID=0 as well
*