Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: diosim on December 14, 2010, 11:08:00 AM

Title: Automatic addressbook plugin
Post by: diosim on December 14, 2010, 11:08:00 AM
Hi,

Since I installed this plugins I got this errors, but everything works fine :)
 I use Roundcube : 0.4.2  

[14-Dec-2010 10:07:10 +0100]: PHP Error: Deprecated hook name. address_sources -> addressbooks_list in /var/webmail/program/include/rcube_plugin_api.php on line 200 (GET /webmail/?_task=addressbook&_remote=1&_action=list&_source=0&_page=1&_=1292317654238&_unlock=1)
[14-Dec-2010 10:07:10 +0100]: PHP Error: Deprecated hook name. get_address_book -> addressbook_get in /var/webmail/program/include/rcube_plugin_api.php on line 200 (GET /webmail/?_task=addressbook&_remote=1&_action=list&_source=0&_page=1&_=1292317654238&_unlock=1)
[14-Dec-2010 10:07:10 +0100]: PHP Error: Deprecated hook name. user_preferences -> preferences_list in /var/webmail/program/include/rcube_plugin_api.php on line 200 (GET /webmail/?_task=addressbook&_remote=1&_action=list&_source=0&_page=1&_=1292317654238&_unlock=1)
[14-Dec-2010 10:07:10 +0100]: PHP Error: Deprecated hook name. save_preferences -> preferences_save in /var/webmail/program/include/rcube_plugin_api.php on line 200 (GET /webmail/?_task=addressbook&_remote=1&_action=list&_source=0&_page=1&_=1292317654238&_unlock=1)
[14-Dec-2010 10:07:10 +0100]: PHP Error: Deprecated hook name. save_contact -> contact_update in /var/webmail/program/include/rcube_plugin_api.php on line 200 (GET /webmail/?_task=addressbook&_remote=1&_action=list&_source=0&_page=1&_=1292317654238&_unlock=1)
[14-Dec-2010 10:07:10 +0100]: PHP Error: Deprecated hook name. create_contact -> contact_create in /var/webmail/program/include/rcube_plugin_api.php on line 200 (GET /webmail/?_task=addressbook&_remote=1&_action=list&_source=0&_page=1&_=1292317654238&_unlock=1)


Someone can help me.

Thanks.
Title: Automatic addressbook plugin
Post by: diosim on December 17, 2010, 04:00:31 AM
Up Up Up!!
Title: Automatic addressbook plugin
Post by: diosim on December 20, 2010, 05:12:43 AM
Up!!
Thanks
Title: Automatic addressbook plugin
Post by: rosali on December 20, 2010, 06:50:27 AM
Update Roundcube to v0.5-RC, use recent plugin version and errors will disappear.
Title: Automatic addressbook plugin
Post by: diosim on December 20, 2010, 10:25:06 AM
I updated roundcube to v0.5-RC, I used automatic addressbook version 3, i didn't find the latest release,
I got the same errors :(
Title: Automatic addressbook plugin
Post by: rosali on December 20, 2010, 10:28:05 AM
It is here:

myroundcube - Project Hosting on Google Code (http://myroundcube.googlecode.com)
Title: Automatic addressbook plugin
Post by: diosim on December 20, 2010, 11:13:38 AM
I did, it's fixe now

Thanks

Best Regards
Title: Automatic addressbook plugin
Post by: billstif on May 10, 2011, 10:47:06 AM
The latest version of automatic_addressbook again has the deprecated code.  To fix the program, edit automatic_addressbook.php

Replace lines 37-45


    public function init()
    {
        $this->add_hook('address_sources', array($this, 'address_sources'));
        $this->add_hook('get_address_book', array($this, 'get_address_book'));
        $this->add_hook('message_sent', array($this, 'register_recipients'));
        $this->add_hook('user_preferences', array($this, 'settings_table'));
        $this->add_hook('save_preferences', array($this, 'save_prefs'));
        $this->add_hook('save_contact', array($this, 'handle_doubles'));
        $this->add_hook('create_contact', array($this, 'handle_doubles'));



with


    public function init()
    {
        $this->add_hook('addressbooks_list', array($this, 'address_sources'));
        $this->add_hook('addressbook_get', array($this, 'get_address_book'));
        $this->add_hook('message_sent', array($this, 'register_recipients'));
        $this->add_hook('preferences_list', array($this, 'settings_table'));
        $this->add_hook('preferences_save', array($this, 'save_prefs'));
        $this->add_hook('contact_update', array($this, 'handle_doubles'));
        $this->add_hook('contact_create', array($this, 'handle_doubles'));



As far as I can tell, that is all that is needed to fix the problems.
Title: Automatic addressbook plugin
Post by: billstif on May 27, 2011, 03:42:33 PM
[IGNORE] It turns out, however, the automatic_addressbook plugin is not working correctly for me. It collects the addresses, but when I edit them, it does not move them, and if I try to manually move them, I get a server error, and the address is deleted. [/IGNORE]

Sorry, Rookie mistake.  When I updated the files, I forgot to modify the config file.  :o
Title: Automatic addressbook plugin
Post by: roundcube76 on June 22, 2011, 06:17:43 AM
Hi,
i have the same problem, when i edit contact from collected_addressbook its copied in personnal_addressbook -> work fine.
But when i move manualy contact from collected_addressbook to personnal_addressbook i have an error and the contact is deleted.