HOR-2689 Removed references to G::LoadClass, Bootstrap::LoadClass and various references to class loading methods and require_once
This commit is contained in:
committed by
davidcallizaya
parent
d72b7aa561
commit
60efcf7ac7
@@ -86,8 +86,6 @@ class Ajax
|
||||
public function saveProcess()
|
||||
{
|
||||
try {
|
||||
require_once 'classes/model/Task.php';
|
||||
G::LoadClass('processMap');
|
||||
$oProcessMap = new ProcessMap();
|
||||
|
||||
if (!isset($_POST['PRO_UID'])) {
|
||||
@@ -123,7 +121,6 @@ class Ajax
|
||||
|
||||
//Save Calendar ID for this process
|
||||
if (isset($_POST['PRO_CALENDAR'])) {
|
||||
G::LoadClass("calendar");
|
||||
$calendarObj = new Calendar();
|
||||
$calendarObj->assignCalendarTo($sProUid, $_POST['PRO_CALENDAR'], 'PROCESS');
|
||||
}
|
||||
@@ -143,7 +140,6 @@ class Ajax
|
||||
{
|
||||
$ids = explode(',', $_REQUEST['UIDS']);
|
||||
|
||||
G::LoadClass('processes');
|
||||
$oProcess = new Processes();
|
||||
if (count($ids) > 0) {
|
||||
foreach ($ids as $id) {
|
||||
@@ -156,7 +152,6 @@ class Ajax
|
||||
{
|
||||
$ids = explode(',', $_REQUEST['UIDS']);
|
||||
|
||||
G::LoadClass('processes');
|
||||
$oProcess = new Processes();
|
||||
if (count($ids) > 0) {
|
||||
foreach ($ids as $id) {
|
||||
@@ -167,8 +162,6 @@ class Ajax
|
||||
|
||||
public function getUsers($params)
|
||||
{
|
||||
require_once 'classes/model/Users.php';
|
||||
G::LoadClass('configuration');
|
||||
$conf = new Configurations();
|
||||
|
||||
$search = isset($params['search']) ? $params['search'] : null;
|
||||
@@ -251,8 +244,6 @@ class Ajax
|
||||
|
||||
public function getUsersTask($param)
|
||||
{
|
||||
require_once 'classes/model/TaskUser.php';
|
||||
G::LoadClass('configuration');
|
||||
$usersTaskList = Array();
|
||||
$task = new TaskUser();
|
||||
$conf = new Configurations();
|
||||
@@ -284,11 +275,8 @@ class Ajax
|
||||
|
||||
public function getProcessDetail($param)
|
||||
{
|
||||
require_once 'classes/model/Process.php';
|
||||
|
||||
$PRO_UID = $param['PRO_UID'];
|
||||
|
||||
G::loadClass('tasks');
|
||||
$tasks = new Tasks();
|
||||
$process = ProcessPeer::retrieveByPk($PRO_UID);
|
||||
|
||||
@@ -320,10 +308,6 @@ class Ajax
|
||||
{
|
||||
switch ($param['type']) {
|
||||
case 'process':
|
||||
require_once 'classes/model/ProcessCategory.php';
|
||||
require_once 'classes/model/CalendarDefinition.php';
|
||||
|
||||
G::LoadClass('processMap');
|
||||
$oProcessMap = new processMap(new DBConnection());
|
||||
$process = $oProcessMap->editProcessNew($param['UID']);
|
||||
$category = ProcessCategoryPeer::retrieveByPk($process['PRO_CATEGORY']);
|
||||
@@ -367,9 +351,6 @@ class Ajax
|
||||
|
||||
switch ($param['type']) {
|
||||
case 'process':
|
||||
require_once 'classes/model/ProcessCategory.php';
|
||||
require_once 'classes/model/CalendarDefinition.php';
|
||||
G::LoadClass('processMap');
|
||||
$oProcessMap = new ProcessMap();
|
||||
$process['PRO_UID'] = $param['UID'];
|
||||
|
||||
@@ -393,7 +374,6 @@ class Ajax
|
||||
$fieldName = 'PRO_CALENDAR';
|
||||
$calendar = CalendarDefinition::loadByCalendarName($param['value']);
|
||||
|
||||
G::LoadClass("calendar");
|
||||
$calendarObj = new Calendar();
|
||||
$calendarObj->assignCalendarTo($process['PRO_UID'], $calendar['CALENDAR_UID'], 'PROCESS');
|
||||
break;
|
||||
@@ -453,7 +433,6 @@ class Ajax
|
||||
|
||||
public function getCaledarList()
|
||||
{
|
||||
G::LoadClass('calendar');
|
||||
$calendar = new CalendarDefinition();
|
||||
$calendarObj = $calendar->getCalendarList(true, true);
|
||||
$calendarObj['array'][0] = Array('CALENDAR_UID' => '', 'CALENDAR_NAME' => '');
|
||||
@@ -465,7 +444,6 @@ class Ajax
|
||||
|
||||
public function getPMVariables($param)
|
||||
{
|
||||
G::LoadClass('processMap');
|
||||
$oProcessMap = new processMap(new DBConnection());
|
||||
$response->rows = getDynaformsVars($param['PRO_UID']);
|
||||
foreach ($response->rows as $i => $var) {
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
G::LoadClass("derivation");
|
||||
|
||||
$dbc = new DBConnection;
|
||||
$obj = new Derivation;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
G::LoadClass("webResource");
|
||||
G::LoadClass("pmFunctions");
|
||||
|
||||
class AdditionalTablesConsolidated extends AdditionalTables
|
||||
{
|
||||
@@ -380,7 +378,6 @@ class ajax_con extends WebResource
|
||||
{
|
||||
public function con_save_properties($sTasUid, $sDynUid, $sStatus, $sProUid, $sRepTabUid, $tableName, $title, $swOverwrite)
|
||||
{
|
||||
G::LoadClass("reportTables");
|
||||
|
||||
if ($sStatus == "1" && $sDynUid != "") {
|
||||
//Verified as not to duplicate the name of the table
|
||||
@@ -462,8 +459,6 @@ class ajax_con extends WebResource
|
||||
|
||||
$_POST['form']['FIELDS'] = array();
|
||||
|
||||
G::LoadClass("reportTables");
|
||||
|
||||
$oReportTable = new ReportTable();
|
||||
//if (!isset($_POST['form']['REP_TAB_CONNECTION'])) {
|
||||
// $_POST['form']['REP_TAB_CONNECTION'] = 'report';
|
||||
@@ -495,7 +490,6 @@ class ajax_con extends WebResource
|
||||
$aAux = explode('-', $_POST['form']['REP_TAB_GRID']);
|
||||
global $G_FORM;
|
||||
|
||||
G::LoadClass("formBatchRouting");
|
||||
$G_FORM = new FormBatchRouting($_POST["form"]["PRO_UID"] . PATH_SEP . $aAux[1], PATH_DYNAFORM, SYS_LANG, false);
|
||||
$aAux = $G_FORM->getVars(false);
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@ try {
|
||||
$downloadUrl = PML_DOWNLOAD_URL . '?id=' . $ObjUid . (isset( $_GET['s'] ) ? '&s=' . $_GET['s'] : '');
|
||||
//print "<hr>$downloadUrl<hr>";die;
|
||||
|
||||
|
||||
G::LoadClass( 'processes' );
|
||||
$oProcess = new Processes();
|
||||
$oProcess->downloadFile( $downloadUrl, $localPath, $newfilename );
|
||||
|
||||
@@ -46,7 +44,7 @@ try {
|
||||
$oProcess->createProcessFromData( $oData, $localPath . $newfilename );
|
||||
|
||||
//show the info after the imported process
|
||||
G::LoadClass( 'processes' );
|
||||
|
||||
$oProcess = new Processes();
|
||||
$oProcess->ws_open_public();
|
||||
$processData = $oProcess->ws_processGetData( $ObjUid );
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
try {
|
||||
//load the variables
|
||||
G::LoadClass( 'processes' );
|
||||
$oProcess = new Processes();
|
||||
|
||||
if (! isset( $_POST['form']['IMPORT_OPTION'] )) {
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_FACTORY' );
|
||||
|
||||
G::loadClass( 'configuration' );
|
||||
$conf = new Configurations();
|
||||
|
||||
$pmVersion = (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch))? $arrayMatch[1] : ""; //Otherwise: Branch master
|
||||
|
||||
@@ -39,8 +39,7 @@ switch ($RBAC->userCanAccess('PM_FACTORY'))
|
||||
}
|
||||
*/
|
||||
$PRO_UID = $_GET['PRO_UID'];
|
||||
require_once 'classes/model/Process.php';
|
||||
G::LoadClass( 'case' );
|
||||
|
||||
$oProcessMap = new Cases();
|
||||
|
||||
$process = new Process();
|
||||
|
||||
@@ -72,7 +72,6 @@ try {
|
||||
$uidAux = $proUid;
|
||||
}
|
||||
|
||||
G::LoadClass('processes');
|
||||
$infoProcess = new Processes();
|
||||
|
||||
if(!$infoProcess->processExists($proUid)) {
|
||||
@@ -106,7 +105,6 @@ try {
|
||||
$row = $oDataset->getRow();
|
||||
$userSupervisor = $row['USR_UID'];
|
||||
|
||||
G::LoadClass('processes');
|
||||
$infoProcess = new Processes();
|
||||
$resultProcess = $infoProcess->getProcessRow($row['PRO_UID']);
|
||||
}
|
||||
@@ -119,13 +117,12 @@ try {
|
||||
} else {
|
||||
$proUid = $_REQUEST['PRO_UID'];
|
||||
}
|
||||
G::LoadClass('processes');
|
||||
|
||||
$infoProcess = new Processes();
|
||||
$resultProcess = $infoProcess->getProcessRow($proUid);
|
||||
}
|
||||
|
||||
if(isset($proUid) && $proUid != "") {
|
||||
G::LoadClass("processes");
|
||||
|
||||
$infoProcess = new Processes();
|
||||
|
||||
@@ -139,7 +136,6 @@ try {
|
||||
$resultProcess = $infoProcess->getProcessRow($proUid);
|
||||
}
|
||||
|
||||
//G::LoadClass( 'processMap' );
|
||||
$oProcessMap = new processMap(new DBConnection());
|
||||
|
||||
switch ($_REQUEST['action']) {
|
||||
@@ -211,7 +207,7 @@ try {
|
||||
break;
|
||||
case 'assignProcessUser':
|
||||
$oProcessMap->assignProcessUser($oData->PRO_UID, $oData->USR_UID, $oData->TYPE_UID);
|
||||
G::LoadClass('processMap');
|
||||
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->listProcessesUser($oData->PRO_UID);
|
||||
G::auditLog('AssignRole','Assign new supervisor ('.$oData->USR_UID.') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
@@ -521,7 +517,7 @@ try {
|
||||
unset($aRow);
|
||||
}
|
||||
if (($oData->delete) || ($oData->type == 0) || ($oData->type == 5) || ($oData->type == 8)) {
|
||||
G::LoadClass('tasks');
|
||||
|
||||
$oTasks = new Tasks();
|
||||
$oTasks->deleteAllRoutesOfTask($oData->pro_uid, $oData->tas_uid);
|
||||
$oTasks->deleteAllGatewayOfTask($oData->pro_uid, $oData->tas_uid);
|
||||
@@ -529,7 +525,7 @@ try {
|
||||
$oProcessMap->saveNewPattern($oData->pro_uid, $oData->tas_uid, $oData->next_task, $sType, $oData->delete);
|
||||
break;
|
||||
case 'deleteAllRoutes':
|
||||
G::LoadClass('tasks');
|
||||
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
@@ -583,7 +579,7 @@ try {
|
||||
$oProcessMap->subProcess_Properties($oData->pro_uid, $oData->tas_uid, $oData->index);
|
||||
break;
|
||||
case 'showDetailsPMDWL':
|
||||
G::LoadClass('processes');
|
||||
|
||||
$oProcesses = new Processes();
|
||||
$oProcesses->ws_open_public();
|
||||
$aFields = get_object_vars($oProcesses->ws_processGetData($oData->pro_uid));
|
||||
@@ -642,7 +638,7 @@ try {
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
case 'loginPML':
|
||||
G::LoadClass('processes');
|
||||
|
||||
//G::LoadThirdParty( 'pear/json', 'class.json' );
|
||||
$oProcesses = new Processes();
|
||||
try {
|
||||
@@ -760,7 +756,7 @@ try {
|
||||
$G_PUBLISH = new Publisher();
|
||||
global $RBAC;
|
||||
if ( $RBAC->userCanAccess('PM_FACTORY') == 1) {
|
||||
G::LoadClass('processes');
|
||||
|
||||
$app = new Processes();
|
||||
if (!$app->processExists($_REQUEST['pro_uid'])) {
|
||||
echo G::LoadTranslation('ID_PROCESS_UID_NOT_DEFINED');
|
||||
@@ -809,7 +805,7 @@ try {
|
||||
* returns an array with all Dynaforms Fields
|
||||
*/
|
||||
case 'getVariableList':
|
||||
G::LoadClass('xmlfield_InputPM');
|
||||
|
||||
$proUid = isset($_REQUEST['process']) ? $_REQUEST['process'] : '';
|
||||
$queryText = isset($_REQUEST['queryText']) ? $_REQUEST['queryText'] : '';
|
||||
switch($_REQUEST['type']) {
|
||||
@@ -869,7 +865,7 @@ try {
|
||||
* return an array with all Variables of Grid type
|
||||
*/
|
||||
case 'getGridList':
|
||||
G::LoadClass('xmlfield_InputPM');
|
||||
|
||||
$proUid = isset($_REQUEST['PRO_UID']) ? $_REQUEST['PRO_UID'] : '';
|
||||
|
||||
$aFields = getGridsVars($proUid);
|
||||
@@ -884,7 +880,6 @@ try {
|
||||
* return an array with all Grid Variables according to Grid
|
||||
*/
|
||||
case 'getVariableGrid':
|
||||
G::LoadClass('xmlfield_InputPM');
|
||||
|
||||
$proUid = isset($_REQUEST['PRO_UID']) ? $_REQUEST['PRO_UID'] : '';
|
||||
$dynUid = isset($_REQUEST['DYN_UID']) ? $_REQUEST['DYN_UID'] : '';
|
||||
@@ -900,7 +895,7 @@ try {
|
||||
echo Bootstrap::json_encode($aVariables);
|
||||
break;
|
||||
case 'getDynaformFieldList':
|
||||
G::LoadClass('dynaformhandler');
|
||||
|
||||
$dynaformFields = array();
|
||||
$resultArray = array();
|
||||
$proUid = isset($_REQUEST['PRO_UID']) ? $_REQUEST['PRO_UID'] : '';
|
||||
|
||||
@@ -38,8 +38,6 @@ if ($access != 1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
//G::LoadClass( 'processMap' );
|
||||
//$oProcessMap = new ProcessMap();
|
||||
|
||||
$uids = explode(',', $_POST['PRO_UIDS']);
|
||||
try {
|
||||
|
||||
@@ -50,7 +50,7 @@ try {
|
||||
$oOP->delete();
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation( 'ID_REPORTTABLE_REMOVED' );
|
||||
G::LoadClass( 'processMap' );
|
||||
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->getObjectsPermissionsCriteria( $sProcessUID );
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -81,88 +81,3 @@ try {
|
||||
$response->message = $e->getMessage();
|
||||
$response->success = false;
|
||||
}
|
||||
|
||||
|
||||
// ************* DEPRECATED (it will be removed soon) *********************************
|
||||
|
||||
//G::LoadThirdParty( 'pear/json', 'class.json' );
|
||||
|
||||
//try {
|
||||
//
|
||||
// function myTruncate ($chain, $limit, $break = '.', $pad = '...')
|
||||
// {
|
||||
// if (strlen( $chain ) <= $limit) {
|
||||
// return $chain;
|
||||
// }
|
||||
// $breakpoint = strpos( $chain, $break, $limit );
|
||||
// if (false !== $breakpoint) {
|
||||
// $len = strlen( $chain ) - 1;
|
||||
// if ($breakpoint < $len) {
|
||||
// $chain = substr( $chain, 0, $breakpoint ) . $pad;
|
||||
// }
|
||||
// }
|
||||
// return $chain;
|
||||
// }
|
||||
//
|
||||
// function addTitlle ($Category, $Id, $Lang)
|
||||
// {
|
||||
// require_once 'classes/model/Content.php';
|
||||
// $content = new Content();
|
||||
// $value = $content->load( $Category, '', $Id, $Lang );
|
||||
// return $value;
|
||||
// }
|
||||
//
|
||||
// //$oJSON = new Services_JSON();
|
||||
// $stdObj = Bootstrap::json_decode( $_POST['data'] );
|
||||
// if (isset( $stdObj->pro_uid ))
|
||||
// $sProUid = $stdObj->pro_uid;
|
||||
// else
|
||||
// throw (new Exception( G::LoadTranslation('ID_PROCESS_UID_NOT_DEFINED') ));
|
||||
//
|
||||
// /* Includes */
|
||||
// G::LoadClass( 'processes' );
|
||||
// $oProcess = new Processes();
|
||||
// $proFields = $oProcess->serializeProcess( $sProUid );
|
||||
// $Fields = $oProcess->saveSerializedProcess( $proFields );
|
||||
// $pathLength = strlen( PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP );
|
||||
// $length = strlen( $Fields['PRO_TITLE'] ) + $pathLength;
|
||||
//
|
||||
// foreach ($Fields as $key => $value) {
|
||||
// if ($key == 'PRO_TITLE') {
|
||||
// $Fields[$key] = myTruncate( $value, 65, ' ', '...' );
|
||||
// }
|
||||
// if ($key == 'FILENAME') {
|
||||
// $Fields[$key] = myTruncate( $value, 60, '_', '...pm' );
|
||||
// }
|
||||
// if (($length) >= 250) {
|
||||
// if ($key == 'FILENAME_LINK') {
|
||||
// list ($file, $rest) = explode( 'p=', $value );
|
||||
// list ($filenameLink, $rest) = explode( '&', $rest );
|
||||
// $Fields[$key] = myTruncate( $filenameLink, 250 - $pathLength, '_', '' );
|
||||
// $Fields[$key] = $file . "p=" . $Fields[$key] . '&' . $rest;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /* Render page */
|
||||
// if (isset( $_REQUEST["processMap"] ) && $_REQUEST["processMap"] == 1) {
|
||||
// $G_PUBLISH = new Publisher();
|
||||
// $G_PUBLISH->AddContent( "xmlform", "xmlform", "processes/processes_Export", "", $Fields );
|
||||
//
|
||||
// G::RenderPage( "publish", "raw" );
|
||||
// } else {
|
||||
// $xmlFrm = new XmlForm();
|
||||
// $xmlFrm->home = PATH_XMLFORM . "processes" . PATH_SEP;
|
||||
// $xmlFrm->parseFile( "processes_Export.xml", SYS_LANG, true );
|
||||
//
|
||||
// $Fields["xmlFrmFieldLabel"] = array ("title" => $xmlFrm->fields["TITLE"]->label,"proTitle" => $xmlFrm->fields["PRO_TITLE"]->label,"proDescription" => $xmlFrm->fields["PRO_DESCRIPTION"]->label,"size" => $xmlFrm->fields["SIZE"]->label,"fileName" => $xmlFrm->fields["FILENAME_LABEL"]->label
|
||||
// );
|
||||
//
|
||||
// echo G::json_encode( $Fields );
|
||||
// }
|
||||
//} catch (Exception $e) {
|
||||
// $G_PUBLISH = new Publisher();
|
||||
// $aMessage['MESSAGE'] = $e->getMessage();
|
||||
// $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
// G::RenderPage( 'publish', 'raw' );
|
||||
//}
|
||||
|
||||
@@ -44,9 +44,6 @@ if ($access != 1) {
|
||||
|
||||
try {
|
||||
|
||||
/* Includes */
|
||||
G::LoadClass( 'processes' );
|
||||
|
||||
/* Render page */
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_ID_MENU_SELECTED = 'PROCESSES';
|
||||
@@ -59,4 +56,4 @@ try {
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
G::RenderPage( 'publish', "blank" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
*/
|
||||
|
||||
try {
|
||||
//load the variables
|
||||
G::LoadClass( 'processes' );
|
||||
$oProcess = new Processes();
|
||||
|
||||
if (! isset( $_POST['form']['IMPORT_OPTION'] )) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
try {
|
||||
//load the variables
|
||||
G::LoadClass( 'processes' );
|
||||
|
||||
$oProcess = new Processes();
|
||||
|
||||
// if ( isset ($_POST) ) {
|
||||
|
||||
@@ -44,9 +44,6 @@ if ($access != 1) {
|
||||
|
||||
try {
|
||||
|
||||
/* Includes */
|
||||
G::LoadClass( 'processes' );
|
||||
|
||||
/* Render page */
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_ID_MENU_SELECTED = 'PROCESSES';
|
||||
|
||||
@@ -69,7 +69,6 @@ if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm
|
||||
}
|
||||
|
||||
if (!empty($arrayTrigger)) {
|
||||
G::LoadClass("codeScanner");
|
||||
|
||||
$cs = new CodeScanner(SYS_SYS);
|
||||
|
||||
@@ -158,7 +157,7 @@ if (isset($_FILES["PROCESS_FILENAME"]) && (pathinfo($_FILES["PROCESS_FILENAME"][
|
||||
} else {
|
||||
$prjUid = $importer->import();
|
||||
}
|
||||
G::LoadClass('Process');
|
||||
|
||||
$oProcess = new Process();
|
||||
$processData = $oProcess->load($prjUid);
|
||||
$proType = $processData["PRO_TYPE"];
|
||||
@@ -308,7 +307,6 @@ if (isset($_POST["PRO_FILENAME"]) &&
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$prjUid = $importer->import($option, $optionGroup, false, $objectsToImport);
|
||||
|
||||
G::LoadClass( 'Process' );
|
||||
$oProcess = new Process();
|
||||
$processData = $oProcess->load( $prjUid );
|
||||
$proType = $processData["PRO_TYPE"];
|
||||
@@ -400,7 +398,6 @@ if ($action == "uploadFileNewProcess") {
|
||||
}
|
||||
|
||||
if ($processFileType == "pm") {
|
||||
G::LoadClass( 'processes' );
|
||||
$oProcess = new Processes();
|
||||
}
|
||||
|
||||
@@ -430,7 +427,6 @@ if ($action == "uploadFileNewProcess") {
|
||||
|
||||
//importing a bpmn diagram, using external class to do it.
|
||||
if ($processFileType == "bpmn") {
|
||||
G::LoadClass( 'bpmnExport' );
|
||||
$bpmn = new bpmnExport();
|
||||
$bpmn->importBpmn( $path . $filename );
|
||||
die();
|
||||
@@ -536,7 +532,6 @@ if ($action == "uploadFileNewProcessExist") {
|
||||
|
||||
//load the variables
|
||||
if ($processFileType == "pm") {
|
||||
G::LoadClass( 'processes' );
|
||||
$oProcess = new Processes();
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ function parseItemArray ($array)
|
||||
}
|
||||
|
||||
try {
|
||||
G::LoadClass( 'processes' );
|
||||
$oProcess = new Processes();
|
||||
$oProcess->ws_open_public();
|
||||
|
||||
@@ -84,7 +83,6 @@ try {
|
||||
$_DBArray['processes'] = $processes;
|
||||
$_SESSION['_DBArray'] = $_DBArray;
|
||||
|
||||
G::LoadClass( 'ArrayPeer' );
|
||||
$c = new Criteria( 'dbarray' );
|
||||
$c->setDBArrayTable( 'processes' );
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ $aLabels['ACTIVE'] = G::LoadTranslation( 'ID_ACTIVE' );
|
||||
$aLabels['INACTIVE'] = G::LoadTranslation( 'ID_INACTIVE' );
|
||||
$aLabels['CONFIRM'] = G::LoadTranslation( 'ID_MSG_CONFIRM_DELETE_PROCESS' );
|
||||
|
||||
G::LoadClass( 'processMap' );
|
||||
$oProcess = new processMap();
|
||||
$c = $oProcess->getConditionProcessList();
|
||||
|
||||
|
||||
@@ -66,8 +66,6 @@ $processUID = $_GET['PRO_UID'];
|
||||
$_SESSION['PROCESS'] = $processUID;
|
||||
$_SESSION['PROCESSMAP'] = 'LEIMNUD';
|
||||
|
||||
G::LoadClass( 'processMap' );
|
||||
|
||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'processes/processes_Map.html' );
|
||||
$oTemplatePower->prepare();
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ switch ($function) {
|
||||
|
||||
$_POST['form']['PRO_TITLE'] = trim( $_POST['form']['PRO_TITLE'] );
|
||||
|
||||
G::LoadClass( 'processMap' );
|
||||
$oProcessMap = new ProcessMap();
|
||||
if (! isset( $_POST['form']['PRO_UID'] )) {
|
||||
$_POST['form']['USR_UID'] = $_SESSION['USER_LOGGED'];
|
||||
@@ -83,7 +82,7 @@ switch ($function) {
|
||||
}
|
||||
|
||||
//Save Calendar ID for this process
|
||||
G::LoadClass( "calendar" );
|
||||
|
||||
$calendarObj = new Calendar();
|
||||
$calendarObj->assignCalendarTo( $sProUid, $_POST['form']['PRO_CALENDAR'], 'PROCESS' );
|
||||
|
||||
@@ -150,7 +149,7 @@ G::auditLog('EditProcess','Edit fields ('.implode(', ',$fields).') in process "'
|
||||
if(isset($_POST['form']['PRO_UID']) && !empty($_POST['form']['PRO_UID'])) {
|
||||
$valuesProcess['PRO_UID'] = $_POST['form']['PRO_UID'];
|
||||
$valuesProcess['PRO_UPDATE_DATE'] = date("Y-m-d H:i:s");
|
||||
G::LoadClass('processes');
|
||||
|
||||
$infoProcess = new Processes();
|
||||
$resultProcess = $infoProcess->updateProcessRow($valuesProcess);
|
||||
}
|
||||
@@ -65,7 +65,7 @@ switch ($sValue['OP_OBJ_TYPE']) {
|
||||
$sObjectUID = $sValue['OUTPUTS'];
|
||||
break;
|
||||
}
|
||||
require_once 'classes/model/ObjectPermission.php';
|
||||
|
||||
$oOP = new ObjectPermission();
|
||||
$aData = array ('OP_UID' => $sValue['OP_UID'],'PRO_UID' => $sValue['PRO_UID'],'TAS_UID' => $sValue['TAS_UID'] != '' ? $sValue['TAS_UID'] : '0','USR_UID' => (string) $sUserGroup,'OP_USER_RELATION' => $iRelation,'OP_TASK_SOURCE' => $sValue['OP_TASK_SOURCE'] != '' ? $sValue['OP_TASK_SOURCE'] : '0','OP_PARTICIPATE' => $sValue['OP_PARTICIPATE'] != '' ? $sValue['OP_PARTICIPATE'] : 0,'OP_OBJ_TYPE' => $sValue['OP_OBJ_TYPE'] != '' ? $sValue['OP_OBJ_TYPE'] : '0','OP_OBJ_UID' => $sObjectUID != '' ? $sObjectUID : '0','OP_ACTION' => $sValue['OP_ACTION'] != '' ? $sValue['OP_ACTION'] : '0','OP_CASE_STATUS' => $sValue['OP_CASE_STATUS'] != '' ? $sValue['OP_CASE_STATUS'] : '0'
|
||||
);
|
||||
@@ -73,6 +73,5 @@ $aData = array ('OP_UID' => $sValue['OP_UID'],'PRO_UID' => $sValue['PRO_UID'],'T
|
||||
$oObj = new ObjectPermission();
|
||||
$oObj->update( $aData );
|
||||
|
||||
G::LoadClass( 'processMap' );
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->getObjectsPermissionsCriteria( $sValue['PRO_UID'] );
|
||||
|
||||
@@ -68,12 +68,12 @@ switch ($sValue['OP_OBJ_TYPE']) {
|
||||
$sObjectUID = $sValue['OUTPUTS'];
|
||||
break;
|
||||
}
|
||||
require_once 'classes/model/ObjectPermission.php';
|
||||
|
||||
$oOP = new ObjectPermission();
|
||||
$aData = array ('OP_UID' => G::generateUniqueID(),'PRO_UID' => $sValue['PRO_UID'],'TAS_UID' => $sValue['TAS_UID'],'USR_UID' => (string) $sUserGroup,'OP_USER_RELATION' => $iRelation,'OP_TASK_SOURCE' => $sValue['OP_TASK_SOURCE'],'OP_PARTICIPATE' => $sValue['OP_PARTICIPATE'],'OP_OBJ_TYPE' => $sValue['OP_OBJ_TYPE'],'OP_OBJ_UID' => $sObjectUID,'OP_ACTION' => $sValue['OP_ACTION'],'OP_CASE_STATUS' => $sValue['OP_CASE_STATUS']);
|
||||
$oOP->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
$oOP->save();
|
||||
G::LoadClass( 'processMap' );
|
||||
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->getObjectsPermissionsCriteria( $sValue['PRO_UID'] );
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
<?php
|
||||
global $RBAC;
|
||||
if ( $RBAC->userCanAccess('PM_FACTORY') == 1) {
|
||||
G::LoadClass('processes');
|
||||
$app = new Processes();
|
||||
if (!$app->processExists($_POST['form']['PRO_UID'])) {
|
||||
echo G::LoadTranslation('ID_PROCESS_UID_NOT_DEFINED');
|
||||
die;
|
||||
if ( $RBAC->userCanAccess('PM_FACTORY') == 1) {
|
||||
|
||||
$app = new Processes();
|
||||
if (!$app->processExists($_POST['form']['PRO_UID'])) {
|
||||
echo G::LoadTranslation('ID_PROCESS_UID_NOT_DEFINED');
|
||||
die;
|
||||
}
|
||||
switch ($_POST['form']['MAIN_DIRECTORY']) {
|
||||
case 'mailTemplates':
|
||||
case 'mailTemplates':
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $_POST['form']['PRO_UID'] . PATH_SEP . ($_POST['form']['CURRENT_DIRECTORY'] != '' ? $_POST['form']['CURRENT_DIRECTORY'] . PATH_SEP : '');
|
||||
break;
|
||||
case 'public':
|
||||
@@ -20,8 +20,8 @@ if ( $RBAC->userCanAccess('PM_FACTORY') == 1) {
|
||||
}
|
||||
for ($i = 1; $i <= 5; $i ++) {
|
||||
if ($_FILES['form']['tmp_name']['FILENAME' . (string) $i] != '') {
|
||||
G::uploadFile( $_FILES['form']['tmp_name']['FILENAME' . (string) $i], $sDirectory, $_FILES['form']['name']['FILENAME' . (string) $i] );
|
||||
G::uploadFile( $_FILES['form']['tmp_name']['FILENAME' . (string) $i], $sDirectory, $_FILES['form']['name']['FILENAME' . (string) $i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
die( '<script type="text/javascript">parent.goToDirectoryforie(\'' . $_POST['form']['PRO_UID'] . '\', \'' . $_POST['form']['MAIN_DIRECTORY'] . '\', \'' . $_POST['form']['CURRENT_DIRECTORY'] . '\');</script>' );
|
||||
die( '<script type="text/javascript">parent.goToDirectoryforie(\'' . $_POST['form']['PRO_UID'] . '\', \'' . $_POST['form']['MAIN_DIRECTORY'] . '\', \'' . $_POST['form']['CURRENT_DIRECTORY'] . '\');</script>' );
|
||||
|
||||
@@ -38,7 +38,6 @@ try {
|
||||
else
|
||||
throw (new Exception( 'the process uid is not defined!.' ));
|
||||
|
||||
G::LoadClass( 'processMap' );
|
||||
$oProcessMap = new ProcessMap();
|
||||
$c = $oProcessMap->listProcessesUser( $sProUid );
|
||||
|
||||
|
||||
@@ -32,10 +32,6 @@
|
||||
try {
|
||||
$sProUid = $oData->PRO_UID;
|
||||
|
||||
require_once 'classes/model/Users.php';
|
||||
require_once 'classes/model/ProcessUser.php';
|
||||
|
||||
G::LoadClass('processMap');
|
||||
$oProcessMap = new ProcessMap();
|
||||
$c = $oProcessMap->listNoProcessesUser($sProUid);
|
||||
global $RBAC;
|
||||
|
||||
@@ -48,4 +48,4 @@ if ($RBAC->userCanAccess('PM_FACTORY') == 1) {
|
||||
}
|
||||
|
||||
echo "{'result': $result, 'msg':'$msg'}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ $sWE_USR = $oData->WE_USR;
|
||||
|
||||
$withWS = $sWE_TYPE == 'WS';
|
||||
|
||||
G::LoadClass( "system" );
|
||||
|
||||
try {
|
||||
$pathProcess = PATH_DATA_SITE . 'public' . PATH_SEP . $sPRO_UID . PATH_SEP;
|
||||
G::mk_dir( $pathProcess, 0777 );
|
||||
@@ -24,7 +22,6 @@ try {
|
||||
throw (new Exception( "The task '" . $TaskFields['TAS_TITLE'] . "' doesn't have a valid assignment type. The task needs to have a 'Cyclical Assignment'." ));
|
||||
}
|
||||
|
||||
G::LoadClass( 'tasks' );
|
||||
$oTask = new Tasks();
|
||||
$user = $oTask->assignUsertoTask( $sTASKS );
|
||||
|
||||
|
||||
@@ -54,21 +54,6 @@ $fields['version'] = $result->version;
|
||||
$fields['time_stamp'] = $result->timestamp;
|
||||
$messageCode = 1;
|
||||
|
||||
G::LoadClass( 'Task' );
|
||||
G::LoadClass( 'User' );
|
||||
G::LoadClass( 'TaskUser' );
|
||||
G::LoadClass( 'Groupwf' );
|
||||
/**
|
||||
* note added by gustavo cruz gustavo-at-colosa-dot-com
|
||||
* This is a little check to see if the GroupUser class has been declared or not.
|
||||
* Seems that the problem its present in a windows installation of PM however.
|
||||
* It's seems that could be replicated in a Linux server easily.
|
||||
* I recomend that in some way check already if a imported class is declared
|
||||
* somewhere else or maybe delegate the task to the G Class LoadClass method.
|
||||
*/
|
||||
if (! class_exists( 'GroupUser' )) {
|
||||
G::LoadClass( 'GroupUser' );
|
||||
}
|
||||
// if the user has been authenticated, then check if has the rights or
|
||||
// permissions to create the webentry
|
||||
if ($result->status_code == 0) {
|
||||
|
||||
@@ -17,10 +17,6 @@ else
|
||||
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
|
||||
@$client = new SoapClient( $endpoint );
|
||||
|
||||
G::LoadClass( 'Task' );
|
||||
G::LoadClass( 'User' );
|
||||
G::LoadClass( 'TaskUser' );
|
||||
|
||||
$oTask = new Task();
|
||||
$TaskFields = $oTask->kgetassigType( $sPRO_UID, $sTASKS );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user