forked from extern/egroupware
fix: SyncML produced dublets, due to the map command when entries come from client
This commit is contained in:
parent
2ce3929f46
commit
33e8f690c3
@ -137,7 +137,8 @@ class Horde_SyncML_Command_Map extends Horde_SyncML_Command {
|
|||||||
Horde::logMessage("SyncML: creating Map for source=" .
|
Horde::logMessage("SyncML: creating Map for source=" .
|
||||||
$this->_mapSource . " and target=" . $this->_mapTarget, __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
$this->_mapSource . " and target=" . $this->_mapTarget, __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||||
// Overwrite existing data by removing it first:
|
// Overwrite existing data by removing it first:
|
||||||
$r = $state->setUID($this->_targetLocURI, $this->_mapSource, $this->_mapTarget);
|
$ts = $state->getServerAnchorNext($this->_targetLocURI);
|
||||||
|
$r = $state->setUID($this->_targetLocURI, $this->_mapSource, $this->_mapTarget, $ts);
|
||||||
if (is_a($r, 'PEAR_Error')) {
|
if (is_a($r, 'PEAR_Error')) {
|
||||||
Horde::logMessage('SyncML: PEAR Error: ' . $r->getMessage(), __FILE__, __LINE__, PEAR_LOG_ERR);
|
Horde::logMessage('SyncML: PEAR Error: ' . $r->getMessage(), __FILE__, __LINE__, PEAR_LOG_ERR);
|
||||||
return false;
|
return false;
|
||||||
|
@ -367,10 +367,13 @@ class EGW_SyncML_State extends Horde_SyncML_State
|
|||||||
# $guid = $GLOBALS['egw']->common->generate_uid($guidParts[0],$guidParts[1]);
|
# $guid = $GLOBALS['egw']->common->generate_uid($guidParts[0],$guidParts[1]);
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
// problem: entries created from client, come here with the (long) server guid,
|
||||||
|
// but getUIDMapping does not know them and can not map server-guid <--> client guid
|
||||||
$guid = $this->getUIDMapping($_guid);
|
$guid = $this->getUIDMapping($_guid);
|
||||||
if($guid === false) {
|
if($guid === false) {
|
||||||
Horde::logMessage("SyncML: setUID $type, $locid, $guid something went wrong!!! Mapping not found.", __FILE__, __LINE__, PEAR_LOG_INFO);
|
Horde::logMessage("SyncML: setUID $type, $locid, $guid something went wrong!!! Mapping not found.", __FILE__, __LINE__, PEAR_LOG_INFO);
|
||||||
return false;
|
$guid = $_guid;
|
||||||
|
//return false;
|
||||||
}
|
}
|
||||||
Horde::logMessage("SyncML: setUID $_guid => $guid", __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
Horde::logMessage("SyncML: setUID $_guid => $guid", __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||||
if($ts == 0) {
|
if($ts == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user