[kronolith] Further work on kronolith/lib/api.php
Matthew Sackman
matthew at sackman.co.uk
Tue Apr 22 19:38:55 PDT 2003
On Mon, Apr 21, 2003 at 11:28:16PM -0400, Chuck Hagenbuch wrote:
> Quoting Matthew Sackman <matthew at sackman.co.uk>:
>
> > I've now managed to get the _kronolith_import_vevent to work correctly
> > from xml_rpc. In that function I require horde/lib/iCalendar.php and
> > horde/lib/iCalendar/vevent.php
>
> Are you saying it doesn't work currently? What's wrong with the code that's
> already there?
On entry to the function _kronolith_import_vevent in api.php, $vevent
contains only text. Ie a pure text representation of the vevent. A
little way into this function, the test:
if (!is_a($vevent, 'Horde_iCalendar_vevent')) {
return PEAR::raiseError(_("There was an error importing the
iCalendar data."));
}
is made which is clearly false as $vevent is plain text. Thus my code
forced the construction of vevent object from the passed text before
the above test is made:
$vevent = new Horde_iCalendar_vevent();
$vevent->parsevCalendar($veventText);
Where $veventText is the text passed into the function (ie all
references to $vevent from the start of the function until the above
assignment are changed to $veventText).
Thanks,
Matthew
--
Matthew Sackman
BOFH excuse #44:
bank holiday - system operating credits not recharged
More information about the kronolith
mailing list