Merge branch 'master' of http://git.syncroton.org/Syncroton
authorLars Kneschke <l.kneschke@metaways.de>
Thu, 4 Oct 2012 05:57:50 +0000 (07:57 +0200)
committerLars Kneschke <l.kneschke@metaways.de>
Thu, 4 Oct 2012 05:57:50 +0000 (07:57 +0200)
tine20/library/Syncroton/lib/Syncroton/Server.php

index c1a0be5..aa133e7 100644 (file)
@@ -286,7 +286,8 @@ class Syncroton_Server
                 'protocolVersion' => $protocolVersion,
                 'command'         => $command,
                 'deviceId'        => $deviceId,
-                'deviceType'      => $deviceType,
+                'deviceType'      => isset($deviceType) ? $deviceType : null,
+                'policyKey'       => isset($policyKey)  ? $policyKey  : null,
                 'saveInSent'      => null,
                 'collectionId'    => null,
                 'itemId'          => null,
@@ -298,6 +299,7 @@ class Syncroton_Server
                 'command'         => $request->getQuery('Cmd'),
                 'deviceId'        => $request->getQuery('DeviceId'),
                 'deviceType'      => $request->getQuery('DeviceType'),
+                'policyKey'       => $request->getServer('HTTP_X_MS_POLICYKEY'),
                 'saveInSent'      => $request->getQuery('SaveInSent'),\r
                 'collectionId'    => $request->getQuery('CollectionId'),\r
                 'itemId'          => $request->getQuery('ItemId'),
@@ -306,7 +308,6 @@ class Syncroton_Server
         }
         \r
         $result['userAgent']   = $request->getServer('HTTP_USER_AGENT', $result['deviceType']);\r
-        $result['policyKey']   = $request->getServer('HTTP_X_MS_POLICYKEY');
         $result['contentType'] = $request->getServer('CONTENT_TYPE');\r
         
         return $result;