forked from extern/egroupware
various bugfixes
This commit is contained in:
parent
1761dcab06
commit
23df97648d
@ -51,6 +51,7 @@ class Horde_SyncML_Command_Sync extends Horde_Syncml_Command {
|
||||
$currentCmdID = $status->output($currentCmdID, $output);
|
||||
|
||||
if($sync = $state->getSync($this->_targetURI)) {
|
||||
Horde::logMessage('SyncML: starting from client for $this->_targetURI = ' . $this->_targetURI, __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||
$currentCmdID = $sync->startSync($currentCmdID, $output);
|
||||
|
||||
foreach ($this->_syncElements as $element) {
|
||||
|
@ -630,20 +630,16 @@ class Horde_SyncML_State {
|
||||
*/
|
||||
function getPreferedContentType($type)
|
||||
{
|
||||
# if ($type == 'contacts') {
|
||||
# return 'text/x-vcard';
|
||||
# } elseif ($type == 'notes') {
|
||||
# return 'text/x-vnote';
|
||||
# } elseif ($type == 'tasks') {
|
||||
# return 'text/x-vcalendar';
|
||||
# } elseif ($type == 'calendar') {
|
||||
# return 'text/x-vcalendar';
|
||||
# }
|
||||
switch($type) {
|
||||
case 'contacts':
|
||||
return 'text/x-vcard';
|
||||
break;
|
||||
|
||||
case 'sifcalendar':
|
||||
case './sifcalendar':
|
||||
return 'text/x-s4j-sife';
|
||||
break;
|
||||
|
||||
case 'sifcontacts':
|
||||
case './sifcontacts':
|
||||
return 'text/x-s4j-sifc';
|
||||
|
@ -99,7 +99,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
|
||||
* from the server database by using Horde API (Registry) calls.
|
||||
*/
|
||||
function runSyncCommand(&$command) {
|
||||
#Horde::logMessage('SyncML: content type is ' . $command->getContentType() .' moreData '. $command->_moreData, __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||
Horde::logMessage('SyncML: content type is ' . $command->getContentType() .' moreData '. $command->_moreData, __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||
global $registry;
|
||||
|
||||
$history = $GLOBALS['egw']->contenthistory;
|
||||
@ -153,6 +153,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
|
||||
$hordeType = str_replace('./','',$hordeType);
|
||||
|
||||
$syncElementItems = $command->getSyncElementItems();
|
||||
Horde::logMessage('SyncML: found '. count($syncElementItems) .' items to import', __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||
|
||||
foreach($syncElementItems as $syncItem) {
|
||||
if(!$contentType = $syncItem->getContentType()) {
|
||||
@ -178,8 +179,10 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
|
||||
# }
|
||||
# } elseif (is_a($command, 'Horde_SyncML_Command_Sync_Replace')) {
|
||||
#$guid = $state->getGlobalUID($type, $syncItem->getLocURI());
|
||||
Horde::logMessage('SyncML: start search for '. $syncItem->getContent() .' ('. $contentType .')' , __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||
$guid = $registry->call($hordeType . '/search',
|
||||
array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType));
|
||||
Horde::logMessage('SyncML: found guid: '. ($guid ? $guid : 'not found') , __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||
$ok = false;
|
||||
if ($guid) {
|
||||
#Horde::logMessage('SyncML: locuri'. $syncItem->getLocURI() . ' guid ' . $guid , __FILE__, __LINE__, PEAR_LOG_ERR);
|
||||
|
Loading…
Reference in New Issue
Block a user