From: Michael J. Rubinsky Date: Sat, 24 Apr 2010 18:38:46 +0000 (-0400) Subject: fix adding new tasks from activesync messages X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e3fde35d09ab22e9470840faa3dee643bb57ce7b;p=horde.git fix adding new tasks from activesync messages $storage->add() returns an array, not the uid. --- diff --git a/nag/lib/Api.php b/nag/lib/Api.php index fef329254..134da4c7f 100644 --- a/nag/lib/Api.php +++ b/nag/lib/Api.php @@ -837,7 +837,7 @@ class Nag_Api extends Horde_Registry_Api case 'activesync': $task = new Nag_Task(); $task->fromASTask($content); - return $storage->add( + $results = $storage->add( isset($task->name) ? $task->name : '', isset($task->desc) ? $task->desc : '', isset($task->start) ? $task->start : 0, @@ -853,6 +853,9 @@ class Nag_Api extends Horde_Registry_Api !empty($task->private), Horde_Auth::getAuth(), isset($task->assignee) ? $task->assignee : null); + + /* array index 0 is id, 1 is uid */ + return $results[1]; } return PEAR::raiseError(sprintf(_("Unsupported Content-Type: %s"), $contentType));