From d2d3fba5f3b30795f3de52ddd38216430bc7829c Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 21 Sep 2010 10:02:27 +0000 Subject: [PATCH] Updated base selector -Display readable bases in the by_input_ fields git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19785 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_ldap.inc | 12 ++++++++---- gosa-core/include/utils/class_msgPool.inc | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index 0d22eb19e..9f6a52bc0 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -140,10 +140,12 @@ class LDAP LDAP::$characterMapRegTo[] = addslashes($to); // Append entry make readable array + LDAP::$readableMapRegFrom[] = "/".preg_quote($to,'/')."/"; LDAP::$readableMapRegFrom[] = "/".preg_quote(stripslashes($to),'/')."/"; - LDAP::$readableMapRegTo[] = stripslashes($from); LDAP::$readableMapRegFrom[] = "/".preg_quote(LDAP::convert($to),'/')."/"; LDAP::$readableMapRegTo[] = stripslashes($from); + LDAP::$readableMapRegTo[] = stripslashes($from); + LDAP::$readableMapRegTo[] = stripslashes($from); } }else{ // To avoid querying a hundred times without any success, stop here. @@ -156,12 +158,14 @@ class LDAP } + /*! \brief This methods replaces non-readable characters be readable ones, + * depends on what were detect in 'updateSpecialCharHandling'. + * @param String The DN/string to cleanup + * @return String The readable string. + */ static function makeReadable($dn) { if(LDAP::$characterMap === NULL) LDAP::updateSpecialCharHandling(); - - print_a(array(LDAP::$readableMapRegFrom,LDAP::$readableMapRegTo,$dn, preg_replace(LDAP::$readableMapRegFrom,LDAP::$readableMapRegTo,$dn))); - return (preg_replace(LDAP::$readableMapRegFrom,LDAP::$readableMapRegTo,$dn)); } diff --git a/gosa-core/include/utils/class_msgPool.inc b/gosa-core/include/utils/class_msgPool.inc index 817c1b911..a981c44cc 100644 --- a/gosa-core/include/utils/class_msgPool.inc +++ b/gosa-core/include/utils/class_msgPool.inc @@ -349,9 +349,9 @@ class msgPool $objects= ""; -- 2.30.2