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);
|
$currentCmdID = $status->output($currentCmdID, $output);
|
||||||
|
|
||||||
if($sync = $state->getSync($this->_targetURI)) {
|
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);
|
$currentCmdID = $sync->startSync($currentCmdID, $output);
|
||||||
|
|
||||||
foreach ($this->_syncElements as $element) {
|
foreach ($this->_syncElements as $element) {
|
||||||
|
@ -630,20 +630,16 @@ class Horde_SyncML_State {
|
|||||||
*/
|
*/
|
||||||
function getPreferedContentType($type)
|
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) {
|
switch($type) {
|
||||||
case 'contacts':
|
case 'contacts':
|
||||||
return 'text/x-vcard';
|
return 'text/x-vcard';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'sifcalendar':
|
||||||
|
case './sifcalendar':
|
||||||
|
return 'text/x-s4j-sife';
|
||||||
|
break;
|
||||||
|
|
||||||
case 'sifcontacts':
|
case 'sifcontacts':
|
||||||
case './sifcontacts':
|
case './sifcontacts':
|
||||||
return 'text/x-s4j-sifc';
|
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.
|
* from the server database by using Horde API (Registry) calls.
|
||||||
*/
|
*/
|
||||||
function runSyncCommand(&$command) {
|
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;
|
global $registry;
|
||||||
|
|
||||||
$history = $GLOBALS['egw']->contenthistory;
|
$history = $GLOBALS['egw']->contenthistory;
|
||||||
@ -153,6 +153,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
|
|||||||
$hordeType = str_replace('./','',$hordeType);
|
$hordeType = str_replace('./','',$hordeType);
|
||||||
|
|
||||||
$syncElementItems = $command->getSyncElementItems();
|
$syncElementItems = $command->getSyncElementItems();
|
||||||
|
Horde::logMessage('SyncML: found '. count($syncElementItems) .' items to import', __FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||||
|
|
||||||
foreach($syncElementItems as $syncItem) {
|
foreach($syncElementItems as $syncItem) {
|
||||||
if(!$contentType = $syncItem->getContentType()) {
|
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')) {
|
# } elseif (is_a($command, 'Horde_SyncML_Command_Sync_Replace')) {
|
||||||
#$guid = $state->getGlobalUID($type, $syncItem->getLocURI());
|
#$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',
|
$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 ? $guid : 'not found') , __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);
|
||||||
|
Loading…
Reference in New Issue
Block a user