Hi Mark,
first of all, I recommend not to develop in 1.4, as we soon have 1.6.
Mark Stosberg schrieb:
Hello,
This week I am hoping to add a feature to the Calendar importer,
allowing links to addressbook entries to be included, a feature with the
Addressbook and Infolog CSV importers already have.
I expect I can mostly follow the examples from the InfoLog CSV importer,
but I’m stuck on how to translate a couple of lines. One is this one
from the InfoLog CSV importer:
$link_id = $boinfolog->link->link(‘infolog’,$id,$app,$app_id);
What is the equivalent of “$boinfolog” for the Calender? Is it the
"$cal" variable? Will it also support “$cal->link->link()” in the same
way?
In trunk you use egw_link::link(…) for all applications.
In 1.4 you have to use:
$GLOBALS[‘egw’]->link->link(…) or $cal->link->link(…) (only in the
calendar/csv_import.php
And a second question from the InfoLog importer:
$boinfolog->write($to_write);
What does that line do?
It writes an infolog entry to the DB.
While I need to use the same syntax for the Calendar importer?
The writing is alread in the calendar import, otherwise it would not work:
1.4: $cal->bo->update(…)
trunk: $cal->update(…)
I also wanted to report that in some places in the CSV importing code I
see references to “cvs_import”, which looks like a typo. Perhaps
"csv_import" was meant instead? If the current spelling is correct, I
think a comment is in order in each location to clarify what’s going on
there.
That’s a (consequent) typo, if you change it now, you loose your current
settings.
I implemented just the linking for trunk, while answering your mail (and
looking for the function names).
You can find the modifications (in case you want to backport them to
1.4) in the changelog: www.egroupware.org/changelog (on the next full
hour, as it updates only hourly).
Ralf
Ralf Becker
eGroupWare Training & Support ==> http://www.egroupware-support.de
Outdoor Unlimited Training GmbH [www.outdoor-training.de]
Handelsregister HRB Kaiserslautern 3587
Geschäftsführer Birgit und Ralf Becker
Leibnizstr. 17, 67663 Kaiserslautern, Germany
Telefon +49 (0)631 31657-0
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers