From ce92ba767a9557daf7f18be94882dd7e6f4591fb Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 30 Sep 2010 09:24:33 -0400
Subject: [PATCH] - Plugin API: improved 'abort' flag handling, added 'result' item in some hooks: group_*, contact_*, identity_* (#1486914)

---
 program/steps/addressbook/import.inc |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/program/steps/addressbook/import.inc b/program/steps/addressbook/import.inc
index ac6dc92..2390e98 100644
--- a/program/steps/addressbook/import.inc
+++ b/program/steps/addressbook/import.inc
@@ -159,7 +159,12 @@
       $a_record = $plugin['record'];
 
       // insert record and send response
-      if (!$plugin['abort'] && ($success = $CONTACTS->insert($a_record))) {
+      if (!$plugin['abort'])
+        $success = $CONTACTS->insert($a_record);
+      else
+        $success = $plugin['result'];
+
+      if ($success) {
         $IMPORT_STATS->inserted++;
         $IMPORT_STATS->names[] = $vcard->displayname;
       } else {

--
Gitblit v1.9.1