lib/kolab_client_task.php
Aleksander Machniak
machniak at kolabsys.com
Wed Apr 11 13:10:08 CEST 2012
lib/kolab_client_task.php | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
New commits:
commit fc59194a2c0b2bc8f23a6af202138eb22c4d397b
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Wed Apr 11 13:09:39 2012 +0200
Simplified pretty-printing of OU - use ldap_dn2ufn()
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index e51af9e..380e590 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -720,24 +720,8 @@ class kolab_client_task
// Exceptions
if ($field['name'] == 'ou') {
- foreach ($options as $idx => $ou) {
- $dn = ldap_explode_dn($ou, 0);
- if (!empty($dn)) {
- unset($dn['count']);
- $ous = array();
- $dcs = array();
- foreach ($dn as $dn_item) {
- if (preg_match('/^ou=/', $dn_item)) {
- $ous[] = substr($dn_item, 3);
- }
- else {
- $dcs[] = substr($dn_item, 3);
- }
- }
- $ou = implode(', ', $ous) . ' (' . implode('.', $dcs) . ')';
- }
- $options[$idx] = $ou;
-
+ foreach ($options as $idx => $dn) {
+ $options[$idx] = ldap_dn2ufn($dn);
}
}
}
More information about the commits
mailing list