[kronolith] Howto use the kronolith API
Michael J Rubinsky
mrubinsk at horde.org
Wed Feb 10 16:11:32 UTC 2021
Quoting Ferdinand Gruber <fer.grub at yahoo.de>:
> 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.
That's a deprecation warning in PHP 7.4 from the autoloader cache
code. That shouldn't be a fatal error. Regardless, it should be fixed.
I'll patch that Soon(tm).
> #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
>
> --
> kronolith mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: kronolith-unsubscribe at lists.horde.org
--
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 9272 bytes
Desc: PGP Public Key
URL: <https://lists.horde.org/archives/kronolith/attachments/20210210/47ed1597/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: PGP Digital Signature
URL: <https://lists.horde.org/archives/kronolith/attachments/20210210/47ed1597/attachment.sig>
More information about the kronolith
mailing list