Author: chaowang
Date: Wed Mar 31 12:41:31 2010
New Revision: 929505

URL: http://svn.apache.org/viewvc?rev=929505&view=rev
Log:
Fixs 2 small bugs: 1) do not remove "// lines from config file; 2) add a 
'fields' non-null test in JsonDbOpensocialService.php

Modified:
    shindig/trunk/php/src/gadgets/ContainerConfig.php
    shindig/trunk/php/src/social/sample/JsonDbOpensocialService.php

Modified: shindig/trunk/php/src/gadgets/ContainerConfig.php
URL: 
http://svn.apache.org/viewvc/shindig/trunk/php/src/gadgets/ContainerConfig.php?rev=929505&r1=929504&r2=929505&view=diff
==============================================================================
--- shindig/trunk/php/src/gadgets/ContainerConfig.php (original)
+++ shindig/trunk/php/src/gadgets/ContainerConfig.php Wed Mar 31 12:41:31 2010
@@ -68,7 +68,7 @@ class ContainerConfig {
     $str = preg_replace('@/\\*.*?\\*/@s', '', $str);
     // remove // style comments, but keep 'http://' 'https://' and '"//'
     // for example: "gadgets.oauthGadgetCallbackTemplate" : 
"//%host%/gadgets/oauthcallback"
-    $str = preg_replace('/(?<!http:|https:)\/\/.*$/m', '', $str);
+    $str = preg_replace('/(?<!http:|https:|")\/\/.*$/m', '', $str);
     return $str;
   }
 

Modified: shindig/trunk/php/src/social/sample/JsonDbOpensocialService.php
URL: 
http://svn.apache.org/viewvc/shindig/trunk/php/src/social/sample/JsonDbOpensocialService.php?rev=929505&r1=929504&r2=929505&view=diff
==============================================================================
--- shindig/trunk/php/src/social/sample/JsonDbOpensocialService.php (original)
+++ shindig/trunk/php/src/social/sample/JsonDbOpensocialService.php Wed Mar 31 
12:41:31 2010
@@ -249,7 +249,7 @@ class JsonDbOpensocialService implements
         if (! $token->isAnonymous() && $id == $token->getOwnerId()) {
           $person['isOwner'] = true;
         }
-        if ($fields[0] != '@all') {
+        if ($fields && $fields[0] != '@all') {
           $newPerson = array();
           $newPerson['id'] = $id;
           $newPerson['isOwner'] = isset($person['isOwner']) ? 
$person['isOwner'] : false;


Reply via email to