R30630 - /trunk/phpgwapi/inc/class.egw_json.inc.php

Author: nathangray
New Revision: 30630

URL: http://www.egroupware.org/viewvc/egroupware?rev=30630&view=rev
Log:
Add handling for in case the input data comes pre-parsed

Modified:
trunk/phpgwapi/inc/class.egw_json.inc.php

Modified: trunk/phpgwapi/inc/class.egw_json.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/phpgwapi/inc/class.egw_json.inc.php?rev=30630&r1=30629&r2=30630&view=diff

— trunk/phpgwapi/inc/class.egw_json.inc.php (original)
+++ trunk/phpgwapi/inc/class.egw_json.inc.php Wed Jun 9 14:57:36 2010
@@ -31,8 +31,16 @@
}
else
{

  •   	//Decode the JSON input data into associative arrays		
    
  •   	if (($json = json_decode(stripslashes($input_data[0]), true)))
    
  •   	if(!is_array($input_data))
    
  •   	{
    
  •   		//Decode the JSON input data into associative arrays
    
  •   		$json = json_decode($input_data, true);
    
  •   	}
    
  •   	else
    
  •   	{
    
  •   		$json = $input_data;
    
  •   	}
    
  •   	if(is_array($json))
      	{
      		//Get the request array
      		if (isset($json['request']))
    

ThinkGeek and WIRED’s GeekDad team up for the Ultimate
GeekDad Father’s Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs