SyncML fixes

This commit is contained in:
Lars Kneschke 2006-05-17 03:33:50 +00:00
parent 911062987d
commit 73441f3ac3
3 changed files with 9 additions and 8 deletions

View File

@ -77,13 +77,13 @@
switch($_action) switch($_action)
{ {
case 'modify': 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; break;
case 'delete': case 'delete':
$query .= "sync_deleted > '".$this->db->to_timestamp($_ts)."'"; $query .= "sync_deleted > '".$this->db->to_timestamp($_ts)."'";
break; break;
case 'add': 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; break;
default: default:
// no valid $_action set // no valid $_action set
@ -179,15 +179,15 @@
$this->db->insert($this->table,$newData,array(),__LINE__,__FILE__); $this->db->insert($this->table,$newData,array(),__LINE__,__FILE__);
} }
$this->db->select($this->table,'sync_added',$where,__LINE__,__FILE__); #$this->db->select($this->table,'sync_added',$where,__LINE__,__FILE__);
$this->db->next_record(); #$this->db->next_record();
$syncAdded = $this->db->f('sync_added'); #$syncAdded = $this->db->f('sync_added');
// now update the time stamp // now update the time stamp
$newData = array ( $newData = array (
'sync_changedby' => $GLOBALS['egw_info']['user']['account_id'], 'sync_changedby' => $GLOBALS['egw_info']['user']['account_id'],
$_action == 'modify' ? 'sync_modified' : 'sync_deleted' => $_ts, $_action == 'modify' ? 'sync_modified' : 'sync_deleted' => $_ts ,
'sync_added' => $syncAdded, # 'sync_added' => $syncAdded,
); );
$this->db->update($this->table, $newData, $where,__LINE__,__FILE__); $this->db->update($this->table, $newData, $where,__LINE__,__FILE__);
break; break;

View File

@ -180,6 +180,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
#$guid = $state->getGlobalUID($type, $syncItem->getLocURI()); #$guid = $state->getGlobalUID($type, $syncItem->getLocURI());
$guid = $registry->call($hordeType . '/search', $guid = $registry->call($hordeType . '/search',
array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType)); array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType));
Horde::logMessage('SyncML: found guid ' . $guid , __FILE__, __LINE__, PEAR_LOG_DEBUG);
$ok = false; $ok = false;
if ($guid) { if ($guid) {
#Horde::logMessage('SyncML: locuri'. $syncItem->getLocURI() . ' guid ' . $guid , __FILE__, __LINE__, PEAR_LOG_ERR); #Horde::logMessage('SyncML: locuri'. $syncItem->getLocURI() . ' guid ' . $guid , __FILE__, __LINE__, PEAR_LOG_ERR);

View File

@ -1,7 +1,7 @@
<?php <?php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */ /* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Horde: horde/config/conf.xml,v 1.79 2005/02/16 15:42:35 jan Exp $ // $Horde: horde/config/conf.xml,v 1.79 2005/02/16 15:42:35 jan Exp $
$conf['debug_level'] = E_ALL; $conf['debug_level'] = E_ERROR | E_WARNING | E_PARSE;
$conf['max_exec_time'] = 0; $conf['max_exec_time'] = 0;
$conf['use_ssl'] = 2; $conf['use_ssl'] = 2;
$conf['server']['name'] = $_SERVER['SERVER_NAME']; $conf['server']['name'] = $_SERVER['SERVER_NAME'];