* Addressbook/LDAP: fix error if egroupware-epl-compat (old API) not installed

This commit is contained in:
Ralf Becker 2016-10-27 10:50:56 +02:00
parent 9710ef4f93
commit 677c862d9b

View File

@ -872,7 +872,22 @@ class Ldap
$order[] = $o; $order[] = $o;
} }
} }
$rows = ExecMethod2('phpgwapi.arrayfunctions.arfsort',$rows,$order,$sort); usort($rows, function($a, $b) use ($order, $sort)
{
foreach($order as $f)
{
if($sort == 'ASC')
{
$strc = strcmp($a[$f], $b[$f]);
}
else
{
$strc = strcmp($b[$f], $a[$f]);
}
if ($strc) return $strc;
}
return 0;
});
} }
// if requested ($start !== false) return only limited resultset // if requested ($start !== false) return only limited resultset
if (is_array($start)) if (is_array($start))