Skip to content

Commit

Permalink
Fix reporting message deletion/change failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Nov 16, 2013
1 parent aa87351 commit 9a949e6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions framework/ActiveSync/lib/Horde/ActiveSync/Connector/Importer.php
Expand Up @@ -181,7 +181,8 @@ public function importMessageChange(
'[%s] Change message failed when updating %s',
$this->_procid, $id)
);
return false;
// Assume any error means the message was not found.
return array($id, Horde_ActiveSync_Request_Sync::STATUS_NOTFOUND);
}
$stat['serverid'] = $this->_folderId;

Expand All @@ -204,15 +205,17 @@ public function importMessageChange(
*
* @param array $ids Server message uids to delete
* @param string $collection The server collection type.
*
* @return array An array containing ids of successfully deleted messages.
*/
public function importMessageDeletion(array $ids, $collection)
{
// Don't support SMS, but can't tell client that.
if ($collection == Horde_ActiveSync::CLASS_SMS) {
return;
return array();
}

// Tell backend about the deletion
// Ask the backend to delete the message.
$mod = $this->_as->driver->getSyncStamp($this->_folderId);
$ids = $this->_as->driver->deleteMessage($this->_folderId, $ids);
foreach ($ids as $id) {
Expand All @@ -228,6 +231,8 @@ public function importMessageDeletion(array $ids, $collection)
Horde_ActiveSync::CHANGE_ORIGIN_PIM,
$this->_as->driver->getUser());
}

return $ids;
}

/**
Expand Down

0 comments on commit 9a949e6

Please sign in to comment.