MFB: Work around Funambol clients requiring a configuration database (Bug #8621).
authorJan Schneider <jan@horde.org>
Wed, 30 Dec 2009 14:20:58 +0000 (15:20 +0100)
committerJan Schneider <jan@horde.org>
Wed, 30 Dec 2009 14:20:58 +0000 (15:20 +0100)
framework/SyncML/SyncML/Backend.php
framework/SyncML/SyncML/Command/Alert.php
framework/SyncML/SyncML/Sync.php

index da9fc03..c9decc1 100644 (file)
@@ -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;
         }
index d3770ef..0f5c767 100644 (file)
@@ -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;
 
index 315f9e6..4d32008 100644 (file)
@@ -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,