[kronolith] Howto use the kronolith API
Ferdinand Gruber
fer.grub at yahoo.de
Wed Feb 10 09:35:32 UTC 2021
Am 06.02.21 um 18:20 schrieb Michael J Rubinsky:
>
> Quoting Ferdinand Gruber <fer.grub at yahoo.de>:
>
>> Hi,
>>
>> please can anyone give me a simple example how to use the kronolith
>> API in my own PHP project.
>>
>> I have been using the script kronolith-import-icals.php in a PHP
>> project for a long time to import events from a separate form into my
>> kronolith calendar.
>>
>
>
> I'm not sure why this would be better than using the import script you
> are already using, as this essentially results in the same actions.
>
Now I changed a little the code from the CLI script
kronolith-import-icals.php and tried it in my PHP script:
require_once '/srv/www/htdocs/horde/kronolith/lib/Application.php';
Horde_Registry::appInit('kronolith', array());
$registry->setAuth($user, array("password"=>$pw));
try {
$result = $registry->call('calendar/import', array($ical,
'text/calendar', $cal));
} catch (Horde_Exception $e) {
$cli->fatal($e->getMessage());
}
At the second line of that code I get this error message:
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b :
c) ? d : e` or `a ? b : (c ? d : e)` Veraltete PHP Funktion.
#1 /usr/share/php7/PEAR/Horde/Autoloader/Cache.php(16)
#2 /usr/share/php7/PEAR/Horde/Autoloader/Cache.php(16):require_once()
#3 /srv/www/htdocs/horde/lib/core.php(48):include_once()
#4 /srv/www/htdocs/horde/kronolith/lib/Application.php(33):require_once()
#5 /srv/www/include/php/library.php(473):require_once()
#6
/srv/www/htdocs/abendmusikdaten/project/controller/ctrl_kronolith_events.php(84):update_kronolith_event()
#7
/srv/www/include/php/application.php(346):controller_kronolith_events->action_update()
#8
/srv/www/htdocs/abendmusikdaten/project/app.php(242):application->controller_init()
#9 /srv/www/htdocs/abendmusikdaten/index.php(45):app->getController()
Many thanks for each hint.
Ferdinand
Ferdinand Gruber
More information about the kronolith
mailing list