diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2014-08-12 18:23:14 (GMT) |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2014-08-12 18:23:14 (GMT) |
commit | 9a647f34cc9aae830d9250c5706431bc03563b7c (patch) | |
tree | 098b42d887f9452754207ae5ef2207085793384b | |
parent | 93cf56fa9e0779ccfc1fc079907d914929e9ec84 (diff) | |
download | kolab-wap-kolab-webadmin-3.2.0.tar.gz |
Fix the reproduction of the original ou a resource is inkolab-webadmin-3.2.0
-rw-r--r-- | lib/api/kolab_api_service_resource.php | 8 |
1 files changed, 8 insertions, 0 deletions
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; } |