From ff47694b242efb2dbe96d367c6813e31568bd13f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 16 Dec 2021 20:07:57 +0200 Subject: [PATCH] fix still not working sync-report for accounts addressbook turns out Microsoft AD also returns a "Virtual List View error" if sorting by standard LDAP (modify|created)timestamp, have to use when(Changed|Created) instead, as for filter --- api/src/Contacts/Ldap.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/Contacts/Ldap.php b/api/src/Contacts/Ldap.php index add83ab607..666f363958 100644 --- a/api/src/Contacts/Ldap.php +++ b/api/src/Contacts/Ldap.php @@ -1129,6 +1129,11 @@ class Ldap { if (($attr = array_search($matches[2], $this->timestamps2egw))) { + // Microsoft AD can NOT VLV sort by (modify|create)TimeStamp, we have to use when(Created|Changed) attribute + if (static::class === Ads::class) + { + $attr = $attr === 'modifytimestamp' ? 'whenChanged' : 'whenCreated'; + } $values[] = [ 'attr' => $attr, // use default match 'oid' => '',