~olivier-chatelain/php-addressbook/trunk

« back to all changes in this revision

Viewing changes to z-push/lib/default/diffbackend/importchangesdiff.php

  • Committer: chatelao
  • Date: 2016-09-11 07:59:37 UTC
  • Revision ID: git-v1:03926e44d99a04a3b05d4761e322a1f5e8a405d7
Chg: Upgrade z-push from 2.0.3 to 2.2.12 (stable)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
*
8
8
* Created   :   02.01.2012
9
9
*
10
 
* Copyright 2007 - 2012 Zarafa Deutschland GmbH
 
10
* Copyright 2007 - 2013 Zarafa Deutschland GmbH
11
11
*
12
12
* This program is free software: you can redistribute it and/or modify
13
13
* it under the terms of the GNU Affero General Public License, version 3,
107
107
                throw new StatusException(sprintf("ImportChangesDiff->ImportMessageChange('%s','%s'): Conflict detected. Data from PIM will be dropped! Server overwrites PIM. User is informed.", $id, get_class($message)), SYNC_STATUS_CONFLICTCLIENTSERVEROBJECT, null, LOGLEVEL_INFO);
108
108
        }
109
109
 
110
 
        $stat = $this->backend->ChangeMessage($this->folderid, $id, $message);
 
110
        $stat = $this->backend->ChangeMessage($this->folderid, $id, $message, $this->contentparameters);
111
111
 
112
112
        if(!is_array($stat))
113
113
            throw new StatusException(sprintf("ImportChangesDiff->ImportMessageChange('%s','%s'): unknown error in backend", $id, get_class($message)), SYNC_STATUS_SYNCCANNOTBECOMPLETED);
148
148
            return false;
149
149
        }
150
150
 
151
 
        $stat = $this->backend->DeleteMessage($this->folderid, $id);
 
151
        $stat = $this->backend->DeleteMessage($this->folderid, $id, $this->contentparameters);
152
152
        if(!$stat)
153
153
            throw new StatusException(sprintf("ImportChangesDiff->ImportMessageDeletion('%s'): Unknown error in backend", $id), SYNC_STATUS_OBJECTNOTFOUND);
154
154
 
177
177
        $change["flags"] = $flags;
178
178
        $this->updateState("flags", $change);
179
179
 
180
 
        $stat = $this->backend->SetReadFlag($this->folderid, $id, $flags);
 
180
        $stat = $this->backend->SetReadFlag($this->folderid, $id, $flags, $this->contentparameters);
181
181
        if (!$stat)
182
182
            throw new StatusException(sprintf("ImportChangesDiff->ImportMessageReadFlag('%s','%s'): Error, unable retrieve message from backend", $id, $flags), SYNC_STATUS_OBJECTNOTFOUND);
183
183
 
199
199
        if ($this->folderid == SYNC_FOLDER_TYPE_DUMMY || $newfolder == SYNC_FOLDER_TYPE_DUMMY)
200
200
            throw new StatusException(sprintf("ImportChangesDiff->ImportMessageMove('%s'): can not be done on a dummy folder", $id), SYNC_MOVEITEMSSTATUS_CANNOTMOVE);
201
201
 
202
 
        return $this->backend->MoveMessage($this->folderid, $id, $newfolder);
 
202
        return $this->backend->MoveMessage($this->folderid, $id, $newfolder, $this->contentparameters);
203
203
    }
204
204
 
205
205