[kronolith] Bug in CSV Import

Derek Au dau@diala.greenpeace.org
27 Sep 2002 10:41:15 +0200


Kronolith v1.0 & Horde v2.1:

Hi,
I've seen mentions of an error when importing csv files in Kronolith,
for
instance "[kronolith] Import of Outlook Calendar".  To summarize, when
clicking
on the "Import" button the error message "The document contains no data"
is
returned by the browser.

I believe that this behavior is due to the Data_csv->importFile function
(horde/lib/Data.php:63), which reads in csv data via the fgetcsv
function:
     $line = fgetcsv($fp, 1024, $delimiter)
..which limits each field to 1024 characters.

Data_csv->importFile is called by horde/kronolith/data.php:196

Because most calendar software, including kronolith, allows users to
input more
than 1024 characters into fields, I believe this should be fixed,
perhaps by
first reading through the input file to determine the length of the
longest line
before importing the csv data.

Apologies if this should have gone to the horde list.

-- 
----- Derek Au
-- -- Greenpeace International, IT
-- -- Keizersgracht 176, 1016 DW Amsterdam
----- The Netherlands
----- +31 20 523 6222 (office)
-- -- +31 6 290 01141 (mobile)