summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9b42188)
raw | patch | inline | side by side (parent: 9b42188)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 13 Jun 2006 11:31:55 +0000 (11:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 13 Jun 2006 11:31:55 +0000 (11:31 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3800 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ldap.inc | patch | blob | history |
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 2662f02db9754f30344e24b14d9f36adc66a7f48..b2085531dc7c755a38ee2de010ec39dad715f9da 100644 (file)
--- 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,"#")<strpos($row,":"))) {
+ if(strpos($row,"#")!=FALSE) {
/* We are using line numbers
Because there is a # before a : */
$tmp1= split("#",$row);
$current_line= $tmp1[0];
- $row= $tmp1[1];
+ $row= base64_decode($tmp1[1]);
}
/* Split the line into attribute and value */
@@ -1052,7 +1054,6 @@ function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $rec
}
}
}
-
/* If dn is an index of data, we should try to insert the data */
if(isset($data['dn'])) {
/* Creating Entry */