[RCD] Problem with contact_create hook

rc rc at deltatechnicalservices.com
Mon May 23 23:34:59 CEST 2011


When doing a drag and drop from one address book to another, the
record value is NULL.  

This may be a problem with my code, what I am
doing is fairly simple..  

in my init I do this.

$this->add_hook('contact_create', array($this, 'contact_create'));

in my contact_create function I am doing this... 

 if( is_null($a['record']) ){

 $a['abort'] = true;
 return $a;

if($a['source'] == $this->abook_id){

 $a['abort'] = false;

 return $a;

And the result I see in the log is...

14:18:10 -0700]: array (
 'record' => NULL,
 'source' =>
 'group' => NULL,
 'abort' => true,

I am dragging
from the personal address book to google_contacts when this happens.
Just creating a contact the normal way works fine, it is just when
dragging and dropping.

Can anyone tell me what I might be doing wrong?
Or is there a bug in the drag and drop not passing a record to the

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20110523/d220b9e7/attachment.html>
-------------- next part --------------
List info: http://lists.roundcube.net/dev/

More information about the Dev mailing list