* 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 dbc31d5ccb
commit a23ab6a9fb

View File

@ -872,7 +872,22 @@ class Ldap
$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 (is_array($start))