alecpl
2010-09-25 e019f2d0f2dc2fbfa345ab5d7ae85e67bfdd76b8
program/steps/mail/addcontact.inc
@@ -4,8 +4,8 @@
 +-----------------------------------------------------------------------+
 | program/steps/mail/addcontact.inc                                     |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2005-2009, Roundcube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
@@ -18,6 +18,10 @@
 $Id$
*/
// only process ajax requests
if (!$OUTPUT->ajax_call)
  return;
$done = false;
$CONTACTS = $RCMAIL->get_address_book(null, true);
@@ -43,7 +47,7 @@
      $OUTPUT->show_message('contactexists', 'warning');
    else
    {
      $plugin = $RCMAIL->plugins->exec_hook('create_contact', array('record' => $contact, 'source' => null));
      $plugin = $RCMAIL->plugins->exec_hook('contact_create', array('record' => $contact, 'source' => null));
      $contact = $plugin['record'];
      if (!$plugin['abort'] && ($done = $CONTACTS->insert($contact)))
@@ -56,4 +60,4 @@
  $OUTPUT->show_message('errorsavingcontact', 'warning');
$OUTPUT->send();
?>