From: hickert Date: Thu, 22 Jun 2006 06:36:53 +0000 (+0000) Subject: Fixed ldif import, attributes like this 'macAdress: 00:00:00:00:00:00' wasn't importe... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4b608873101ac87d330d89c8881ec1967ba4f88f;p=gosa.git Fixed ldif import, attributes like this 'macAdress: 00:00:00:00:00:00' wasn't imported correctly. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3862 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_ldap.inc b/include/class_ldap.inc index d79ef172c..dbcfc24d6 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -1062,6 +1062,9 @@ class LDAP{ $attr[0]= trim($attr[0]); /* attribute */ $attr[1]= trim($attr[1]); /* value */ + $attr[0] = trim( preg_replace("/:.*$/","",$row)); + $attr[1] = trim( preg_replace("/^".$attr[0]."[ ::]/","",$row)); + /* Check for attributes that are used more than once */ if(!isset($data[$attr[0]])) { $data[$attr[0]]=$attr[1];