Changing deprecated json->decode json->encode by Bootstrap functions.

This commit is contained in:
ralph
2012-11-29 14:25:06 -04:00
parent 5c89c9d499
commit 2df7ff709a
18 changed files with 93 additions and 94 deletions

View File

@@ -39,7 +39,7 @@ try {
//$oJSON = new Services_JSON();
if (isset( $_REQUEST['data'] )) {
$oData = G::json_decode( stripslashes( $_REQUEST['data'] ) );
$oData = Bootstrap::json_decode( stripslashes( $_REQUEST['data'] ) );
//$oData = $oJSON->decode( stripslashes( $_REQUEST['data'] ) );
$sOutput = '';
$sTask = '';
@@ -319,7 +319,7 @@ try {
$oProcessMap->processFilesManager( $oData->pro_uid );
break;
case 'exploreDirectory':
$objData = G::json_decode( $_REQUEST['data'] );
$objData = Bootstrap::json_decode( $_REQUEST['data'] );
$_SESSION['PFMDirectory'] = $objData->{'main_directory'};
$oProcessMap->exploreDirectory( $oData->pro_uid, $oData->main_directory, $oData->directory );
break;
@@ -399,7 +399,7 @@ try {
break;
case 'loginPML':
G::LoadClass( 'processes' );
G::LoadThirdParty( 'pear/json', 'class.json' );
//G::LoadThirdParty( 'pear/json', 'class.json' );
$oProcesses = new Processes();
try {
if ($oProcesses->ws_open( $oData->u, $oData->p ) == 1) {
@@ -421,8 +421,8 @@ try {
$oResponse->sLink = '../processes/downloadPML?id=' . $oData->pro_uid . '&s=' . $sessionId;
}
$oResponse->bExists = $bExists;
$oJSON = new Services_JSON();
echo $oJSON->encode( $oResponse );
//$oJSON = new Services_JSON();
echo Bootstrap::json_encode( $oResponse );
break;
case 'editFile':
//echo $_REQUEST['filename'];
@@ -542,8 +542,8 @@ try {
}
$response = new stdclass();
$response->casesNumRec = $casesNumRec;
$json = new Services_JSON();
$sOutput = $json->encode( $response );
//$json = new Services_JSON();
$sOutput = Bootstrap::json_encode( $response );
break;
}
if (isset( $sOutput )) {

View File

@@ -22,7 +22,7 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
G::LoadThirdParty( 'pear/json', 'class.json' );
//G::LoadThirdParty( 'pear/json', 'class.json' );
try {
@@ -49,8 +49,8 @@ try {
return $value;
}
$oJSON = new Services_JSON();
$stdObj = $oJSON->decode( $_POST['data'] );
//$oJSON = new Services_JSON();
$stdObj = Bootstrap::json_decode( $_POST['data'] );
if (isset( $stdObj->pro_uid ))
$sProUid = $stdObj->pro_uid;
else

View File

@@ -27,7 +27,7 @@
*
*/
G::LoadThirdParty( 'pear/json', 'class.json' );
//G::LoadThirdParty( 'pear/json', 'class.json' );
$function = isset( $_POST['function'] ) ? $_POST['function'] : '';
@@ -58,7 +58,7 @@ switch ($function) {
$oProcessMap = new ProcessMap();
if (! isset( $_POST['form']['PRO_UID'] )) {
$_POST['form']['USR_UID'] = $_SESSION['USER_LOGGED'];
$oJSON = new Services_JSON();
//$oJSON = new Services_JSON();
require_once 'classes/model/Task.php';
$sProUid = $oProcessMap->createProcess( $_POST['form'] );

View File

@@ -29,10 +29,10 @@
* @Date 16/05/2008
* @LastModification none
*/
G::LoadThirdParty( 'pear/json', 'class.json' );
//G::LoadThirdParty( 'pear/json', 'class.json' );
try {
$oJSON = new Services_JSON();
$stdObj = $oJSON->decode( stripslashes( $_POST['data'] ) );
//$oJSON = new Services_JSON();
$stdObj = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
if (isset( $stdObj->pro_uid ))
$sProUid = $stdObj->pro_uid;
else