From 73441f3ac303c624389563590292da0241bb7d91 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Wed, 17 May 2006 03:33:50 +0000 Subject: [PATCH] SyncML fixes --- phpgwapi/inc/class.contenthistory.inc.php | 14 +++++++------- phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php | 1 + phpgwapi/inc/horde/config/conf.php | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/phpgwapi/inc/class.contenthistory.inc.php b/phpgwapi/inc/class.contenthistory.inc.php index f4ac055225..85a1dcb9ea 100644 --- a/phpgwapi/inc/class.contenthistory.inc.php +++ b/phpgwapi/inc/class.contenthistory.inc.php @@ -77,13 +77,13 @@ switch($_action) { case 'modify': - $query .= "sync_modified > '".$this->db->to_timestamp($_ts)."' and (sync_deleted is null or sync_deleted = '0')"; + $query .= "sync_modified > '".$this->db->to_timestamp($_ts)."' and sync_deleted is null"; break; case 'delete': $query .= "sync_deleted > '".$this->db->to_timestamp($_ts)."'"; break; case 'add': - $query .= "sync_added > '".$this->db->to_timestamp($_ts)."' and (sync_deleted is null or sync_deleted = '0') and (sync_modified is null or sync_modified = '0') "; + $query .= "sync_added > '".$this->db->to_timestamp($_ts)."' and sync_deleted is null and sync_modified is null"; break; default: // no valid $_action set @@ -179,15 +179,15 @@ $this->db->insert($this->table,$newData,array(),__LINE__,__FILE__); } - $this->db->select($this->table,'sync_added',$where,__LINE__,__FILE__); - $this->db->next_record(); - $syncAdded = $this->db->f('sync_added'); + #$this->db->select($this->table,'sync_added',$where,__LINE__,__FILE__); + #$this->db->next_record(); + #$syncAdded = $this->db->f('sync_added'); // now update the time stamp $newData = array ( 'sync_changedby' => $GLOBALS['egw_info']['user']['account_id'], - $_action == 'modify' ? 'sync_modified' : 'sync_deleted' => $_ts, - 'sync_added' => $syncAdded, + $_action == 'modify' ? 'sync_modified' : 'sync_deleted' => $_ts , + # 'sync_added' => $syncAdded, ); $this->db->update($this->table, $newData, $where,__LINE__,__FILE__); break; diff --git a/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php b/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php index f826521049..9798adc563 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php @@ -180,6 +180,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync { #$guid = $state->getGlobalUID($type, $syncItem->getLocURI()); $guid = $registry->call($hordeType . '/search', array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType)); + Horde::logMessage('SyncML: found guid ' . $guid , __FILE__, __LINE__, PEAR_LOG_DEBUG); $ok = false; if ($guid) { #Horde::logMessage('SyncML: locuri'. $syncItem->getLocURI() . ' guid ' . $guid , __FILE__, __LINE__, PEAR_LOG_ERR); diff --git a/phpgwapi/inc/horde/config/conf.php b/phpgwapi/inc/horde/config/conf.php index 61d9c0aa59..188b15ce28 100644 --- a/phpgwapi/inc/horde/config/conf.php +++ b/phpgwapi/inc/horde/config/conf.php @@ -1,7 +1,7 @@