MFB - fix return data structure
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 5 Oct 2010 21:23:57 +0000 (17:23 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 5 Oct 2010 21:24:22 +0000 (17:24 -0400)
Bug: 9277

framework/SyncML/SyncML/Device/Nokia.php

index 27a795f..b4cfa01 100644 (file)
@@ -42,6 +42,24 @@ class SyncML_Device_Nokia extends SyncML_Device {
         return array($content, $contentType);
     }
 
+    /**
+     * Converts the content from the backend to a format suitable for the
+     * client device.
+     *
+     * Strips the UID (primary key) information as client and server might use
+     * different ones.
+     *
+     * Charset conversions might be added here too.
+     *
+     * @param string $content      The content to convert
+     * @param string $contentType  The content type of content as returned
+     *                             from the backend
+     * @param string $database     The server database URI.
+     *
+     * @return array  Three-element array with the converted content, the
+     *                (possibly changed) new content type, and encoding type
+     *                (like b64 as used by Funambol).
+     */
     function convertServer2Client($content, $contentType, $database)
     {
         $database = $GLOBALS['backend']->_normalize($database);
@@ -57,7 +75,7 @@ class SyncML_Device_Nokia extends SyncML_Device {
             SYNCML_LOGFILE_DATA,
             "\nOutput converted for client ($contentType):\n$content\n");
 
-        return array($content, $contentType);
+        return array($content, $contentType, null);
     }
 
     function handleTasksInCalendar()