From: hickert Date: Tue, 13 Jun 2006 11:31:55 +0000 (+0000) Subject: Made ldif import able to import entries conaining # X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=068579c6ea743b5be21db78d60202f4ccb4fbc75;p=gosa.git Made ldif import able to import entries conaining # git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3800 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 2662f02db..b2085531d 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -936,12 +936,12 @@ function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $rec $attr = $encoded[0]; $value = base64_decode($encoded[1]); /* Add linenumber */ - $data .= $current_line."#".$attr.":".$value."\n"; + $data .= $current_line."#".base64_encode($attr.":".$value)."\n"; } else { /* Add Linenumber */ - $data .= $current_line."#".$entry."\n"; + $data .= $current_line."#".base64_encode($entry)."\n"; } } } @@ -957,7 +957,7 @@ function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $rec foreach ( $all as $single) { $lineone = split("\n",$single); $ndn = split("#", $lineone[0]); - $line = $ndn[1]; + $line = base64_decode($ndn[1]); $dnn = split (":",$line); $current_line = $ndn[0]; @@ -1009,6 +1009,8 @@ function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $rec { if($this->reconnect) $this->connect(); + + $ret = false; $rows= split("\n",$str_attr); $data= false; @@ -1018,13 +1020,13 @@ function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $rec /* Check if we use Linenumbers (when import_complete_ldif is called we use Linenumbers) Linenumbers are use like this 123#attribute : value */ if(!empty($row)) { - if((strpos($row,"#")!=FALSE)&&(strpos($row,"#")