|
|
@@ -60,7 +60,7 @@ class Schema_AccessGroupStorageAcl extends Core_AclBase {// Read only class
|
|
|
foreach ($userLdapGroups as $vLdapGroup) {
|
|
|
$allowGroup = false;
|
|
|
if ('workgroup' == $vLdapGroup->cn) {
|
|
|
- $items[1] = ['id'=>'0', 'name'=>$vLdapGroup->name, 'uid'=>$vLdapGroup->cn];
|
|
|
+ $items[0] = ['id'=>'0', 'name'=>$vLdapGroup->name, 'uid'=>$vLdapGroup->cn];
|
|
|
} else {
|
|
|
$cnTest = str_replace('-', '_', $vLdapGroup->cn);
|
|
|
$cnTest = explode('_', $cnTest);
|
|
|
@@ -128,7 +128,7 @@ class Schema_AccessGroupStorageAcl extends Core_AclBase {// Read only class
|
|
|
$orderDir = strtolower(V::get('order_dir', 'desc', $params));
|
|
|
if (!in_array($orderBy, ['id', 'name', 'uid'])) throw new HttpException("Bad Request - wrong or missing order by", 400);
|
|
|
if (!in_array($orderDir, ['desc', 'asc'])) throw new HttpException("Bad Request - wrong or missing order dir", 400);
|
|
|
- usort($items, function ($a, $b) use ($orderBy, $orderDir) {
|
|
|
+ uasort($items, function ($a, $b) use ($orderBy, $orderDir) {
|
|
|
if ('desc' == $orderDir) {
|
|
|
return (V::geti($orderBy, '', $a) > V::geti($orderBy, '', $b)) ? -1 : 1;
|
|
|
} else if ('asc' == $orderDir) {
|