Add string trim to fix Netscape import and debug

This commit is contained in:
Miles Lott 2001-03-12 01:45:43 +00:00
parent b1a199ae36
commit 1c1da7f852
3 changed files with 4 additions and 0 deletions

View File

@ -163,6 +163,7 @@ objectClass: importPerson";
$this->givenName = $value;
}
$value = trim($value);
$value = str_replace("\n","",$value);
$name = str_replace("\n","",$name);
$value = str_replace("\r","",$value);

View File

@ -124,6 +124,7 @@
}
function import_new_attrib($buffer,$name,$value) {
$value = trim($value);
$value = str_replace("\n","",$value);
$value = str_replace("\r","",$value);
if ($value=="") { $value="NULL"; }

View File

@ -89,6 +89,8 @@
function import_new_attrib($buffer,$name,$value) {
//$value = str_replace("\n","<BR>",$value);
// chop leading space from value
$value = trim($value);
$value = str_replace("\r","",$value);
//echo '<br>'.$name.' => '.$value;
$this->currentrecord += array($name => $value);