PM-3720
This commit is contained in:
committed by
Victor Saisa Lopez
parent
3bc6770295
commit
d2dc4e650a
@@ -1877,20 +1877,20 @@ class pmTablesProxy extends HttpProxyController
|
||||
public function getDynaformVariables($sProcessUID,$excludeFieldsList,$allowed = true)
|
||||
{
|
||||
$dynaformVariables = array();
|
||||
$oC = new Criteria( 'workflow' );
|
||||
$oC->addSelectColumn( DynaformPeer::DYN_CONTENT );
|
||||
$oC->add( DynaformPeer::PRO_UID, $sProcessUID );
|
||||
$oData = DynaformPeer::doSelectRS( $oC );
|
||||
$oData->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oData->next();
|
||||
while ($aRowd = $oData->getRow()) {
|
||||
$dynaform = G::json_decode($aRowd['DYN_CONTENT'],true);
|
||||
if(is_array($dynaform) && sizeof($dynaform)) {
|
||||
$items = $dynaform['items'][0]['items'];
|
||||
$oC = new Criteria( 'workflow' );
|
||||
$oC->addSelectColumn( DynaformPeer::DYN_CONTENT );
|
||||
$oC->add( DynaformPeer::PRO_UID, $sProcessUID );
|
||||
$oData = DynaformPeer::doSelectRS( $oC );
|
||||
$oData->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oData->next();
|
||||
while ($aRowd = $oData->getRow()) {
|
||||
$dynaform = G::json_decode($aRowd['DYN_CONTENT'],true);
|
||||
if(is_array($dynaform) && sizeof($dynaform)) {
|
||||
$items = $dynaform['items'][0]['items'];
|
||||
foreach($items as $key => $val){
|
||||
foreach($val as $column) {
|
||||
if($allowed) {
|
||||
if(!in_array( $column['type'], $excludeFieldsList )){
|
||||
if(isset($column['type']) && !in_array( $column['type'], $excludeFieldsList )){
|
||||
if(array_key_exists('variable',$column)) {
|
||||
if($column['variable'] != "") {
|
||||
$dynaformVariables[] = $column['variable'];
|
||||
@@ -1898,7 +1898,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(in_array( $column['type'], $excludeFieldsList )){
|
||||
if(isset($column['type']) && in_array( $column['type'], $excludeFieldsList )){
|
||||
if(array_key_exists('variable',$column)) {
|
||||
if($column['variable'] != "") {
|
||||
$dynaformVariables[] = $column['variable'];
|
||||
@@ -1907,9 +1907,9 @@ class pmTablesProxy extends HttpProxyController
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$oData->next();
|
||||
}
|
||||
}
|
||||
$oData->next();
|
||||
}
|
||||
return array_unique($dynaformVariables);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user