SF Feature #2879726 - sort the server select list
This commit is contained in:
parent
775e6f40d4
commit
1121dd01df
@ -661,6 +661,8 @@ class Datastore {
|
||||
if (! $isVisible || ($isVisible && $server->getValue('server','visible')))
|
||||
$CACHE[$isVisible][$id] = $server;
|
||||
|
||||
masort($CACHE[$isVisible],'name');
|
||||
|
||||
return $CACHE[$isVisible];
|
||||
}
|
||||
|
||||
|
@ -127,6 +127,19 @@ class ldap_pla extends ldap {
|
||||
'default'=>null);
|
||||
}
|
||||
|
||||
public function __get($key) {
|
||||
switch ($key) {
|
||||
case 'name':
|
||||
return $this->getValue('server','name');
|
||||
|
||||
default:
|
||||
system_message(array(
|
||||
'title'=>_('Unknown request for Object value.'),
|
||||
'body'=>sprintf(_('Attempt to obtain value %s from %s'),$key,get_class($this)),
|
||||
'type'=>'error'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether the admin has configured phpLDAPadmin to show the "Create New" link in the tree viewer.
|
||||
* <code>
|
||||
|
@ -1000,7 +1000,7 @@ function get_custom_file($index,$filename,$path) {
|
||||
* @return array Sorted multi demension array.
|
||||
*/
|
||||
function masort(&$data,$sortby,$rev=0) {
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
if (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
|
||||
|
||||
# if the array to sort is null or empty
|
||||
|
Loading…
Reference in New Issue
Block a user