From b1245cbd1df92a797ff276634a861a1a98b7509a Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 30 Dec 2009 15:20:58 +0100 Subject: [PATCH] MFB: Work around Funambol clients requiring a configuration database (Bug #8621). --- framework/SyncML/SyncML/Backend.php | 13 +++++++------ framework/SyncML/SyncML/Command/Alert.php | 4 ++++ framework/SyncML/SyncML/Sync.php | 3 +++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/framework/SyncML/SyncML/Backend.php b/framework/SyncML/SyncML/Backend.php index da9fc030d..c9decc188 100644 --- a/framework/SyncML/SyncML/Backend.php +++ b/framework/SyncML/SyncML/Backend.php @@ -451,15 +451,16 @@ class SyncML_Backend { $database = $this->_normalize($databaseURI); switch($database) { - case 'tasks'; - case 'calendar'; - case 'notes'; - case 'contacts'; + case 'tasks': + case 'calendar': + case 'notes': + case 'contacts': + case 'configuration': return true; default: - $this->logMessage('Invalid database ' . $database - . '. Try tasks, calendar, notes or contacts.', + $this->logMessage('Invalid database "' . $database + . '". Try tasks, calendar, notes or contacts.', __FILE__, __LINE__, PEAR_LOG_ERR); return false; } diff --git a/framework/SyncML/SyncML/Command/Alert.php b/framework/SyncML/SyncML/Command/Alert.php index d3770ef3b..0f5c767d5 100644 --- a/framework/SyncML/SyncML/Command/Alert.php +++ b/framework/SyncML/SyncML/Command/Alert.php @@ -151,6 +151,10 @@ class SyncML_Command_Alert extends SyncML_Command { RESPONSE_NOT_FOUND); return; } + if ($database == 'configuration') { + $this->_outputHandler->outputStatus($this->_cmdID, $this->_cmdName, + RESPONSE_OK); + } $clientAnchorNext = $this->_metaAnchorNext; diff --git a/framework/SyncML/SyncML/Sync.php b/framework/SyncML/SyncML/Sync.php index 315f9e611..4d3200821 100644 --- a/framework/SyncML/SyncML/Sync.php +++ b/framework/SyncML/SyncML/Sync.php @@ -601,6 +601,9 @@ class SyncML_Sync { function _retrieveChanges($syncDB, &$adds, &$replaces, &$deletes) { $adds = $replaces = $deletes = array(); + if ($syncDB == 'configuration') { + return; + } $result = $GLOBALS['backend']->getServerChanges($syncDB, $this->_serverAnchorLast, $this->_serverAnchorNext, -- 2.11.0