Files
luos/workflow/engine/methods/bpmn/proxyStepTriggers.php
Alexandre Rosenfeld 50bf854bee BUG 6400 Replacing json_encode|json_decode by their G implementations
This fixes the problem of some pages of ProcessMaker not working on
PHP 5.1, since there is no json_encode or json_decode native functions
on PHP 5.1.
2011-04-19 16:26:20 -04:00

41 lines
1.3 KiB
PHP
Executable File

<?php
try
{
G::LoadClass('processMap');
$oProcessMap = new processMap(new DBConnection);
//$_GET['sid'] gets STEP_UID and sTYPE(i.e BEFORE and AFTER) in format STEP_UID-sTYPE
if(isset($_GET['stepid']))
{
$aStepTypeId = explode('|',$_GET['stepid']);
$_SESSION['stepUID'] = $_GET['stepid'];
//$aStepTypeId = explode('-','2517180104cd42c25cc39e4071099227-BEFORE');
$sStep = $aStepTypeId[0];
$sType = $aStepTypeId[1];
}
if (isset($_GET['pid'] ) && isset($_SESSION['stepUID']))
{
$aStepTypeId = explode('|',$_SESSION['stepUID']);
$sStep = $aStepTypeId[0];
$sType = $aStepTypeId[1];
//Getting available Steps Criteria that have been not selected for a particular task
$rows = $oProcessMap->getExtAvailableStepTriggersCriteria($_GET['pid'], $sStep, $_GET['tid'], $sType);
}
else
{
//Getting all Steps Criteria that have been selected for a particular task
$rows = $oProcessMap->getExtStepTriggersCriteria($sStep, $_GET['tid'], $sType);
}
$result['totalCount'] = count($rows);
$result['data'] = $rows;
print G::json_encode( $result ) ;
}
catch ( Exception $e ) {
print G::json_encode ( $e->getMessage() );
}
?>