We need the results of these method calls.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 14 Sep 2010 21:50:37 +0000 (17:50 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 15 Sep 2010 13:15:05 +0000 (09:15 -0400)
Not sure why these were removed, but it breaks importing contacts
via the API.

turba/lib/Api.php

index 22b63ce..9a54ab9 100644 (file)
@@ -657,18 +657,18 @@ class Turba_Api extends Horde_Registry_Api
                                 continue;
                             }
 
-                            $driver->add($content);
+                            $result = $driver->add($content);
                             if (!empty($content['category']) &&
                                 !in_array($content['category'], $categories)) {
                                     $cManager->add($content['category']);
                                     $categories[] = $content['category'];
-                                }
+                            }
                             $ids[] = $result;
                         }
                     }
+
                     return $ids;
                 }
-                break;
 
             case 'activesync':
                 $content = $driver->fromASContact($content);
@@ -690,7 +690,7 @@ class Turba_Api extends Horde_Registry_Api
             throw new Turba_Exception(_("Already Exists"));
         }
 
-        $driver->add($content);
+        $result = $driver->add($content);
 
         if (!empty($content['category']) &&
             !in_array($content['category'], $categories)) {