PMC-60
This commit is contained in:
committed by
Paula Quispe
parent
7f6155702f
commit
991709f17f
@@ -1,32 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* open.php Open Case main processor
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||
* @date Jan 3th, 2010
|
||||
*/
|
||||
|
||||
$tBarGmail = false;
|
||||
if (isset($_GET['gmail']) && $_GET['gmail'] == 1) {
|
||||
@@ -121,22 +93,29 @@ if (isset($_GET['actionFromList']) && ($_GET['actionFromList'] === 'to_revise'))
|
||||
$script = 'cases_Open?';
|
||||
}
|
||||
|
||||
// getting bpmn projects
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn(BpmnProjectPeer::PRJ_UID);
|
||||
$ds = ProcessPeer::doSelectRS($c);
|
||||
$ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$bpmnProjects = array();
|
||||
$process = new Process();
|
||||
$fields = $process->load($case['PRO_UID']);
|
||||
$isBpmn = $fields['PRO_BPMN'] === 1 ? true : false;
|
||||
|
||||
while ($ds->next()) {
|
||||
$row = $ds->getRow();
|
||||
$bpmnProjects[] = $row['PRJ_UID'];
|
||||
$showCustomForm = false;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$respView = $oCase->getAllObjectsFrom($case['PRO_UID'], $appUid, $case['TAS_UID'], $_SESSION['USER_LOGGED'], 'VIEW');
|
||||
$viewSummaryForm = isset($respView['SUMMARY_FORM']) && $respView['SUMMARY_FORM'] === 1 ? true : false;
|
||||
$isNoEmpty = isset($fields['PRO_DYNAFORMS']['PROCESS']) && !empty($fields['PRO_DYNAFORMS']['PROCESS']);
|
||||
|
||||
if ($isBpmn && $viewSummaryForm && $isNoEmpty) {
|
||||
$showCustomForm = true;
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$oStep = new Step();
|
||||
$oStep = $oStep->loadByProcessTaskPosition($case['PRO_UID'], $case['TAS_UID'], 1);
|
||||
$oHeadPublisher->assign('uri', $script . $uri);
|
||||
$oHeadPublisher->assign('_APP_NUM', '#: ' . $case['APP_NUMBER']);
|
||||
$oHeadPublisher->assign('_PROJECT_TYPE', in_array($case['PRO_UID'], $bpmnProjects) ? 'bpmn' : 'classic');
|
||||
$oHeadPublisher->assign('_PROJECT_TYPE', $isBpmn ? 'bpmn' : 'classic');
|
||||
$oHeadPublisher->assign('_PRO_UID', $case['PRO_UID']);
|
||||
$oHeadPublisher->assign('_APP_UID', $appUid);
|
||||
$oHeadPublisher->assign('_ENV_CURRENT_DATE', $conf->getSystemDate(date('Y-m-d')));
|
||||
@@ -144,6 +123,7 @@ $oHeadPublisher->assign('_ENV_CURRENT_DATE_NO_FORMAT', date('Y-m-d-h-i-A'));
|
||||
$oHeadPublisher->assign('idfirstform', is_null($oStep) ? '-1' : $oStep->getStepUidObj());
|
||||
$oHeadPublisher->assign('appStatus', $case['APP_STATUS']);
|
||||
$oHeadPublisher->assign('tbarGmail', $tBarGmail);
|
||||
$oHeadPublisher->assign('showCustomForm', $showCustomForm);
|
||||
|
||||
if (!isset($_SESSION['APPLICATION']) || !isset($_SESSION['TASK']) || !isset($_SESSION['INDEX'])) {
|
||||
$_SESSION['PROCESS'] = $case['PRO_UID'];
|
||||
|
||||
Reference in New Issue
Block a user