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