fix for last line of vcard not being a emtpy line

This commit is contained in:
Lars Kneschke 2003-10-12 08:19:43 +00:00
parent a98fdbaa06
commit 5240128a24

View File

@ -181,6 +181,7 @@
}
else
{
$needToCallEndRecord = 0;
while ($data = fgets($fp,8000))
{
$data = trim($data);
@ -200,6 +201,7 @@
if (strtolower(substr($name,0,5)) == 'begin')
{
$buffer = $contacts->import_start_record($buffer);
$needToCallEndRecord = 1;
}
if ($name && $value)
{
@ -215,8 +217,11 @@
else
{
$buffer = $contacts->import_end_record($buffer);
$needToCallEndRecord = 0;
}
}
if($needToCallEndRecord)
$buffer = $contacts->import_end_record($buffer);
}
fclose($fp);