lib/api

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Tue Aug 12 20:23:31 CEST 2014


 lib/api/kolab_api_service_resource.php |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 9a647f34cc9aae830d9250c5706431bc03563b7c
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Tue Aug 12 20:23:14 2014 +0200

    Fix the reproduction of the original ou a resource is in

diff --git a/lib/api/kolab_api_service_resource.php b/lib/api/kolab_api_service_resource.php
index e3d6de1..8c65e20 100644
--- a/lib/api/kolab_api_service_resource.php
+++ b/lib/api/kolab_api_service_resource.php
@@ -210,6 +210,14 @@ class kolab_api_service_resource extends kolab_api_service
         // normalize result
         $result = $this->parse_result_attributes('resource', $result);
 
+        if (empty($result['ou'])) {
+            $dn = ldap_explode_dn($result['entrydn'], 0);
+            // pop the count and rdn
+            unset($dn['count']);
+            unset($dn[0]);
+            $result['ou'] = implode(',', $dn);
+        }
+
         if ($result) {
             return $result;
         }




More information about the commits mailing list