[Kolab-devel] Accessing contacts from roundcube cli

Andrzej Kwiatkowski <[email protected]>
Newsgroups gmane.comp.kde.devel.kolab
Message-ID <51FFAEE1.4000603__8600.35684095255$1375711214$gmane$org@opensoft.pl>
Hi,

I need to write cmd tool to access kolab adressbook from cli.

Script looks like:


require_once INSTALL_PATH.'program/include/clisetup.php';

$RCMAIL = rcmail::get_instance();

$RCMAIL->login($user, $pass, $host = null, $cookiecheck = false);

$RCMAIL->task="addressbook";

$RCMAIL->plugins->init($RCMAIL, $RCMAIL->task);
$RCMAIL->plugins->load_plugins((array)$RCMAIL->config->get('plugins', 
array()), array('filesystem_attachments', 'jqueryui'));


Now i would like to list address sources
so i try to do:

$ka=new kolab_addressbook(null);

print_r($ka->get_address_sources()); - line 107

But this gives me:
PHP Fatal error:  Call to undefined method 
kolab_addressbook::get_address_sources() in abook.php on line 107

when i add $ka->init(); before line 107 i got:

HP Fatal error:  Call to a member function load_plugin() on a non-object 
in /program/lib/Roundcube/rcube_plugin.php on line 102


Have aby idea?

Regards
AK
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.