Author: chabotc
Date: Sun Oct 12 07:39:22 2008
New Revision: 703827

URL: http://svn.apache.org/viewvc?rev=703827&view=rev
Log:
REST write actions to app data are now fully functional

Modified:
    incubator/shindig/trunk/php/src/social/service/AppDataHandler.php
    incubator/shindig/trunk/php/src/social/service/RestRequestItem.php
    incubator/shindig/trunk/php/src/social/service/RpcRequestItem.php
    incubator/shindig/trunk/php/src/social/servlet/ApiServlet.php
    incubator/shindig/trunk/php/src/social/spi/DataCollection.php

Modified: incubator/shindig/trunk/php/src/social/service/AppDataHandler.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/service/AppDataHandler.php?rev=703827&r1=703826&r2=703827&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/service/AppDataHandler.php (original)
+++ incubator/shindig/trunk/php/src/social/service/AppDataHandler.php Sun Oct 
12 07:39:22 2008
@@ -18,7 +18,7 @@
  */
 
 class AppDataHandler extends DataRequestHandler {
-       private static $APP_DATA_PATH = "/appdata/{userId}/{groupId}/{appId}";
+       private static $APP_DATA_PATH = "/appdata/{userId}/{groupId}/appId";
        private $service;
 
        public function __construct()

Modified: incubator/shindig/trunk/php/src/social/service/RestRequestItem.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/service/RestRequestItem.php?rev=703827&r1=703826&r2=703827&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/service/RestRequestItem.php 
(original)
+++ incubator/shindig/trunk/php/src/social/service/RestRequestItem.php Sun Oct 
12 07:39:22 2008
@@ -184,11 +184,17 @@
                $stringList = isset($this->params[$paramName]) ? 
$this->params[$paramName] : null;
                if ($stringList == null) {
                        return array();
+               } elseif (is_array($stringList)) {
+                       // already converted to array, return straight away
+                       return $stringList;
                }
-               if (count($stringList) == 1 && strpos($stringList[0], ',') !== 
false) {
+               if (strpos($stringList, ',') !== false) {
                        $stringList = explode(',', $stringList);
-                       $this->params[$paramName] = $stringList;
+               } else {
+                       // Allow up-conversion of non-array to array params.
+                       $stringList = array($stringList);
                }
+               $this->params[$paramName] = $stringList;
                return $stringList;
        }
 }

Modified: incubator/shindig/trunk/php/src/social/service/RpcRequestItem.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/service/RpcRequestItem.php?rev=703827&r1=703826&r2=703827&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/service/RpcRequestItem.php (original)
+++ incubator/shindig/trunk/php/src/social/service/RpcRequestItem.php Sun Oct 
12 07:39:22 2008
@@ -84,7 +84,6 @@
                        }
                } else {
                        return array();
-                       ;
                }
        }
 

Modified: incubator/shindig/trunk/php/src/social/servlet/ApiServlet.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/servlet/ApiServlet.php?rev=703827&r1=703826&r2=703827&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/servlet/ApiServlet.php (original)
+++ incubator/shindig/trunk/php/src/social/servlet/ApiServlet.php Sun Oct 12 
07:39:22 2008
@@ -130,6 +130,6 @@
                if ($e instanceof SocialSpiException) {
                        return new ResponseItem($e->getCode(), 
$e->getMessage(), null);
                }
-               return new ResponseItem(ResponseError . INTERNAL_ERROR, t . 
getMessage());
+               return new ResponseItem(ResponseError::$INTERNAL_ERROR, 
$e->getMessage());
        }
 }

Modified: incubator/shindig/trunk/php/src/social/spi/DataCollection.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/spi/DataCollection.php?rev=703827&r1=703826&r2=703827&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/spi/DataCollection.php (original)
+++ incubator/shindig/trunk/php/src/social/spi/DataCollection.php Sun Oct 12 
07:39:22 2008
@@ -18,7 +18,7 @@
  */
 
 class DataCollection {
-       private $entry;
+       public $entry;
 
        public function __construct($entry)
        {


Reply via email to