Hi all, all these plugins create a calendar instance by: Now I have to insert before parent::__contstruct ... $rcmail = rcmail::get_instance(); $rcmail->config->set('db_table_contacts', $rcmail->config->get('db_table_collected_contacts')); Otherwise it will use the default contacts table. Is this a bug or intended behavior? Regards, Roland
List info: http://lists.roundcube.net/dev/
Roland Liebl wrote:
class automatic_addressbook_backend extends rcube_contacts { function __construct($dbconn, $user) { parent::__construct($dbconn, $user); $this->db_name = get_table_name('collected_contacts'); } } ?> Now I have to insert before parent::__contstruct ... $rcmail = rcmail::get_instance(); $rcmail->config->set('db_table_contacts', $rcmail->config->get('db_table_collected_contacts')); Otherwise it will use the default contacts table. Is this a bug or intended behavior?
No, it isn't, but what exactly is the issue? I see a one possible bug in rcube_contacts. In insert() method we're using hardcoded 'contacts' name in: $insert_id = $this->db->insert_id('contacts');
So, this will be fixed. Probably groups handling should be improved for class inheritance, something more?
The problem is that the code below worked for 0.3.x.
Now it reads from and writes into default contacts database table unless I overwrite the configuration before creating the addressbook instance by ...
$rcmail = rcmail::get_instance(); $rcmail->config->set('db_table_contacts', $rcmail->config->get('db_table_collected_contacts'));
Intall automatic_addressbook from http://myroundcube.googlecode.com to check yourself.
On Mon, 26 Apr 2010 13:01:45 +0200, "A.L.E.C" alec@alec.pl wrote:
Roland Liebl wrote:
class automatic_addressbook_backend extends rcube_contacts { function __construct($dbconn, $user) { parent::__construct($dbconn, $user); $this->db_name = get_table_name('collected_contacts'); } } ?> Now I have to insert before parent::__contstruct ... $rcmail = rcmail::get_instance(); $rcmail->config->set('db_table_contacts', $rcmail->config->get('db_table_collected_contacts')); Otherwise it will use the default contacts table. Is this a bug or intended behavior?
No, it isn't, but what exactly is the issue? I see a one possible bug in
rcube_contacts. In insert() method we're using hardcoded 'contacts' name in: $insert_id = $this->db->insert_id('contacts');
So, this will be fixed. Probably groups handling should be improved for class inheritance, something more?
List info: http://lists.roundcube.net/dev/
On Mon, 26 Apr 2010 13:01:45 +0200, "A.L.E.C" alec@alec.pl wrote:
Roland Liebl wrote:
class automatic_addressbook_backend extends rcube_contacts { function __construct($dbconn, $user) { parent::__construct($dbconn, $user); $this->db_name = get_table_name('collected_contacts'); } } ?> Now I have to insert before parent::__contstruct ... $rcmail = rcmail::get_instance(); $rcmail->config->set('db_table_contacts', $rcmail->config->get('db_table_collected_contacts')); Otherwise it will use the default contacts table. Is this a bug or intended behavior?
No, it isn't, but what exactly is the issue? I see a one possible bug in
rcube_contacts. In insert() method we're using hardcoded 'contacts' name in: $insert_id = $this->db->insert_id('contacts');
So, this will be fixed. Probably groups handling should be improved for class inheritance, something more?
Fixing rcube_contacts does not solve the problem.
List info: http://lists.roundcube.net/dev/
Roland Liebl wrote:
The problem is that the code below worked for 0.3.x.
Now it reads from and writes into default contacts database table unless I overwrite the configuration before creating the addressbook instance by ...
Quick fix in r3562, but I feel that would be better to make $db_name private and set it via 3rd parameter of class constructor, so it may change in the future.
On Mon, 26 Apr 2010 14:47:51 +0200, "A.L.E.C" alec@alec.pl wrote:
Roland Liebl wrote:
The problem is that the code below worked for 0.3.x.
Now it reads from and writes into default contacts database table unless I overwrite the configuration before creating the addressbook instance by ...
Quick fix in r3562, but I feel that would be better to make $db_name private and set it via 3rd parameter of class constructor, so it may change in the future.
Thanks this did the trick.
List info: http://lists.roundcube.net/dev/