Skip to content

Commit

Permalink
Must return the atchash from replace operations as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Aug 31, 2016
1 parent dcc66c8 commit eaceecd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kronolith/lib/Api.php
Expand Up @@ -1187,6 +1187,8 @@ public function move($uid, $source, $target)
* @param string $calendar Ensure the event is replaced in the specified
* calendar. @since 4.2.0
*
* @return mixed For EAS operations, an array of 'uid' and 'atchash'
* are returned. @since 4.3.0
* @throws Kronolith_Exception
*/
public function replace($uid, $content, $contentType, $calendar = null)
Expand All @@ -1202,8 +1204,15 @@ public function replace($uid, $content, $contentType, $calendar = null)
$component = $content;
} elseif ($content instanceof Horde_ActiveSync_Message_Appointment) {
$event->fromASAppointment($content);
$atc_hash = $event->addEASFiles($content);
$event->save();
$event->uid = $uid;
return array(
'uid' => $event->uid,
'atchash' => $atc_hash,
// See Bug #12567
//'syncstamp' => $stamp
);
return;
} else {
switch ($contentType) {
Expand Down

0 comments on commit eaceecd

Please sign in to comment.