Merged colosa/processmaker into master
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
if ( !defined('PATH_SEP') ) {
|
||||
define('PATH_SEP', ( substr(PHP_OS, 0, 3) == 'WIN' ) ? '\\' : '/');
|
||||
define("PATH_SEP", (substr(PHP_OS, 0, 3) == "WIN")? "\\" : "/");
|
||||
}
|
||||
|
||||
$docuroot = explode(PATH_SEP, str_replace('engine' . PATH_SEP . 'methods' . PATH_SEP . 'services', '', dirname(__FILE__)));
|
||||
@@ -129,7 +129,7 @@ if ($force || !$bCronIsRunning) {
|
||||
$oDirectory = dir(PATH_DB);
|
||||
$cws = 0;
|
||||
|
||||
while($sObject = $oDirectory->read()) {
|
||||
while (($sObject = $oDirectory->read()) !== false) {
|
||||
if (($sObject != ".") && ($sObject != "..")) {
|
||||
if (is_dir(PATH_DB . $sObject)) {
|
||||
if (file_exists(PATH_DB . $sObject . PATH_SEP . "db.php")) {
|
||||
@@ -141,6 +141,10 @@ if ($force || !$bCronIsRunning) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!is_dir(PATH_DB . $ws) || !file_exists(PATH_DB . $ws . PATH_SEP . "db.php")) {
|
||||
throw new Exception("Error: The workspace \"$ws\" does not exist");
|
||||
}
|
||||
|
||||
$cws = 1;
|
||||
|
||||
system("php -f \"" . dirname(__FILE__) . PATH_SEP . "cron_single.php\" $ws \"$sDate\" \"$dateSystem\" $argsx", $retval);
|
||||
|
||||
@@ -10,11 +10,6 @@ register_shutdown_function(
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* cron_single.php
|
||||
* @package workflow-engine-bin
|
||||
*/
|
||||
|
||||
if (!defined('SYS_LANG')) {
|
||||
define('SYS_LANG', 'en');
|
||||
}
|
||||
@@ -220,9 +215,6 @@ Bootstrap::registerClass('CaseTrackerObject', PATH_HOME . "engine/classes/mod
|
||||
Bootstrap::registerClass('BaseCaseTrackerObjectPeer',PATH_HOME . "engine/classes/model/om/BaseCaseTrackerObjectPeer.php");
|
||||
Bootstrap::registerClass('CaseTrackerObjectPeer', PATH_HOME . "engine/classes/model/CaseTrackerObjectPeer.php");
|
||||
|
||||
Bootstrap::registerClass('BaseConfiguration', PATH_HOME . "engine/classes/model/om/BaseConfiguration.php");
|
||||
Bootstrap::registerClass('Configuration', PATH_HOME . "engine/classes/model/Configuration.php");
|
||||
|
||||
Bootstrap::registerClass('BaseDbSource', PATH_HOME . "engine/classes/model/om/BaseDbSource.php");
|
||||
Bootstrap::registerClass('DbSource', PATH_HOME . "engine/classes/model/DbSource.php");
|
||||
|
||||
@@ -367,7 +359,7 @@ Bootstrap::registerClass("AddonsManagerPeer", PATH_HOME . "engine" . PATH_SEP
|
||||
Bootstrap::registerClass('dashboards', PATH_HOME . "engine/classes/class.dashboards.php");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$arrayClass = array("EmailServer", "ListInbox", "ListParticipatedHistory");
|
||||
$arrayClass = array("Configuration", "EmailServer", "ListInbox", "ListParticipatedHistory");
|
||||
|
||||
foreach ($arrayClass as $value) {
|
||||
Bootstrap::registerClass("Base" . $value, PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "om" . PATH_SEP . "Base" . $value . ".php");
|
||||
|
||||
@@ -114,6 +114,10 @@ try {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!is_dir(PATH_DB . $workspace) || !file_exists(PATH_DB . $workspace . PATH_SEP . "db.php")) {
|
||||
throw new Exception("Error: The workspace \"$workspace\" does not exist");
|
||||
}
|
||||
|
||||
$countw++;
|
||||
|
||||
passthru("php -f \"$messageEventCronSinglePath\" $workspace \"" . base64_encode(PATH_HOME) . "\" \"" . base64_encode(PATH_TRUNK) . "\" \"" . base64_encode(PATH_OUTTRUNK) . "\"");
|
||||
|
||||
@@ -752,14 +752,19 @@ class Derivation
|
||||
//$appFields['APP_PROC_CODE'] = $nextDel['TAS_DEF_PROC_CODE'];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($nextDel['TAS_UID'] != '-1') {
|
||||
$taskCur = TaskPeer::retrieveByPK($nextDel['TAS_UID']);
|
||||
$aTask = $taskCur->toArray( BasePeer::TYPE_FIELDNAME );
|
||||
$taskNex = TaskPeer::retrieveByPK($nextDel['TAS_UID']);
|
||||
$aTask = $taskNex->toArray( BasePeer::TYPE_FIELDNAME );
|
||||
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
|
||||
if (!in_array($aTask['TAS_TYPE'], $arrayTaskTypeToExclude)) {
|
||||
if (!empty($iNewDelIndex) && empty($aSP)) {
|
||||
$oAppDel = AppDelegationPeer::retrieveByPK( $appFields['APP_UID'], $iNewDelIndex );
|
||||
$aFields = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME );
|
||||
$aFields['APP_STATUS'] = $currentDelegation['APP_STATUS'];
|
||||
$taskCur = TaskPeer::retrieveByPK($currentDelegation['TAS_UID']);
|
||||
$aTaskCur = $taskCur->toArray( BasePeer::TYPE_FIELDNAME );
|
||||
if ($aTaskCur['TAS_TYPE'] == "INTERMEDIATE-CATCH-MESSAGE-EVENT") {
|
||||
$removeList = false;
|
||||
}
|
||||
$aFields['REMOVED_LIST'] = $removeList;
|
||||
$inbox = new ListInbox();
|
||||
$inbox->newRow($aFields, $appFields['CURRENT_USER_UID'], false, array(), ($nextDel['TAS_ASSIGN_TYPE'] == 'SELF_SERVICE' ? true : false));
|
||||
|
||||
@@ -399,22 +399,19 @@ class PMPluginRegistry
|
||||
}
|
||||
|
||||
/**
|
||||
* get status plugin in the singleton
|
||||
* Get status plugin in the singleton
|
||||
*
|
||||
* @param unknown_type $sNamespace
|
||||
* @param string $name Plugin name
|
||||
*
|
||||
* return mixed Return a string with status plugin, 0 otherwise
|
||||
*/
|
||||
public function getStatusPlugin ($sNamespace)
|
||||
public function getStatusPlugin($name)
|
||||
{
|
||||
foreach ($this->_aPluginDetails as $namespace => $detail) {
|
||||
if ($sNamespace == $namespace) {
|
||||
if ($this->_aPluginDetails[$sNamespace]->enabled) {
|
||||
return 'enabled';
|
||||
} else {
|
||||
return 'disabled';
|
||||
}
|
||||
}
|
||||
try {
|
||||
return (isset($this->_aPluginDetails[$name]))? (($this->_aPluginDetails[$name]->enabled)? "enabled" : "disabled") : 0;
|
||||
} catch (Excepton $e) {
|
||||
throw $e;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -149,16 +149,30 @@ try {
|
||||
}
|
||||
break;
|
||||
case 'authSourcesNew':
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
|
||||
$arr = Array ();
|
||||
$oDirectory = dir( PATH_RBAC . 'plugins' . PATH_SEP );
|
||||
$aAuthSourceTypes = array ();
|
||||
|
||||
while ($sObject = $oDirectory->read()) {
|
||||
if (($sObject != '.') && ($sObject != '..') && ($sObject != '.svn') && ($sObject != 'ldap')) {
|
||||
if (is_file( PATH_RBAC . 'plugins' . PATH_SEP . $sObject )) {
|
||||
$sType = trim( str_replace( 'class.', '', str_replace( '.php', '', $sObject ) ) );
|
||||
$aAuthSourceTypes['sType'] = $sType;
|
||||
$aAuthSourceTypes['sLabel'] = $sType;
|
||||
$arr[] = $aAuthSourceTypes;
|
||||
$sType = trim(str_replace(array("class.", ".php"), "", $sObject));
|
||||
|
||||
$statusPlugin = $pluginRegistry->getStatusPlugin($sType);
|
||||
$flagAdd = false;
|
||||
|
||||
if (preg_match("/^(?:enabled|disabled)$/", $statusPlugin)) {
|
||||
if ($statusPlugin == "enabled") {
|
||||
$flagAdd = true;
|
||||
}
|
||||
} else {
|
||||
$flagAdd = true;
|
||||
}
|
||||
|
||||
if ($flagAdd) {
|
||||
$arr[] = array("sType" => $sType, "sLabel" => $sType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,12 @@ switch ($action) {
|
||||
$urlProxy = 'proxyCasesList';
|
||||
$action = 'unassigned';
|
||||
break;
|
||||
case 'to_revise':
|
||||
$urlProxy = 'proxyCasesList';
|
||||
break;
|
||||
case 'to_reassign':
|
||||
$urlProxy = 'proxyCasesList';
|
||||
break;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<tr>
|
||||
{if $user_logged neq '' or $tracker neq ''}
|
||||
<td rowspan="2" style="vertical-align:top;width: 245px;"><img src="{$logo_company}" class="logo_company"/></td>
|
||||
<td class="mainMenuBG" rowspan="2" valign="center" >
|
||||
<td id="mainMenuBG" class="mainMenuBG" rowspan="2" valign="center" >
|
||||
{include file="$tpl_menu"}
|
||||
{if (count($subMenus)>0) }
|
||||
{include file= "$tpl_submenu"}
|
||||
|
||||
@@ -861,15 +861,33 @@ class Cases
|
||||
*
|
||||
* @access public
|
||||
* @param string $app_uid, Uid for case
|
||||
* @param string $usr_uid, Uid user
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*/
|
||||
public function deleteCase($app_uid)
|
||||
public function deleteCase($app_uid, $usr_uid)
|
||||
{
|
||||
Validator::isString($app_uid, '$app_uid');
|
||||
Validator::appUid($app_uid, '$app_uid');
|
||||
|
||||
$criteria = new \Criteria();
|
||||
$criteria->addSelectColumn( \ApplicationPeer::APP_STATUS );
|
||||
$criteria->addSelectColumn( \ApplicationPeer::APP_INIT_USER );
|
||||
$criteria->add( \ApplicationPeer::APP_UID, $app_uid, \Criteria::EQUAL );
|
||||
$dataset = \ApplicationPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
if ($aRow['APP_STATUS'] != 'DRAFT') {
|
||||
throw (new \Exception(\G::LoadTranslation("ID_DELETE_CASE_NO_STATUS")));
|
||||
}
|
||||
|
||||
if ($aRow['APP_INIT_USER'] != $usr_uid) {
|
||||
throw (new \Exception(\G::LoadTranslation("ID_DELETE_CASE_NO_OWNER")));
|
||||
}
|
||||
|
||||
$case = new \Cases();
|
||||
$case->removeCase( $app_uid );
|
||||
}
|
||||
|
||||
@@ -190,12 +190,11 @@ class FilesManager
|
||||
break;
|
||||
}
|
||||
$content = $aData['prf_content'];
|
||||
if (is_string($content)) {
|
||||
if (file_exists($sDirectory)) {
|
||||
$directory = $sMainDirectory. PATH_SEP . $sSubDirectory . $aData['prf_filename'];
|
||||
throw new \Exception(\G::LoadTranslation("ID_EXISTS_FILE", array($directory)));
|
||||
}
|
||||
if (file_exists($sDirectory) ) {
|
||||
$directory = $sMainDirectory. PATH_SEP . $sSubDirectory . $aData['prf_filename'];
|
||||
throw new \Exception(\G::LoadTranslation("ID_EXISTS_FILE", array($directory)));
|
||||
}
|
||||
|
||||
if (!file_exists($sCheckDirectory)) {
|
||||
$sPkProcessFiles = \G::generateUniqueID();
|
||||
$oProcessFiles = new \ProcessFiles();
|
||||
@@ -555,4 +554,3 @@ class FilesManager
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -497,7 +497,10 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
//Setting as start Task
|
||||
//or
|
||||
//Remove as start Task
|
||||
$this->wp->setStartTask($arrayFlowData["FLO_ELEMENT_DEST"], $flagStartTask);
|
||||
$bwp = new self;
|
||||
if ($bwp->getActivity($arrayFlowData["FLO_ELEMENT_DEST"])) {
|
||||
$this->wp->setStartTask($arrayFlowData["FLO_ELEMENT_DEST"], $flagStartTask);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1384,6 +1387,10 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
|
||||
$activity = $bwp->getActivity($activityData["ACT_UID"]);
|
||||
|
||||
if ($activity["BOU_CONTAINER"] != $activityData["BOU_CONTAINER"]) {
|
||||
$activity = null;
|
||||
}
|
||||
|
||||
if ($forceInsert || is_null($activity)) {
|
||||
if ($generateUid) {
|
||||
//Generate and update UID
|
||||
|
||||
@@ -809,8 +809,9 @@ class Cases extends Api
|
||||
public function doDeleteCase($cas_uid)
|
||||
{
|
||||
try {
|
||||
$usr_uid = $this->getUserId();
|
||||
$cases = new \ProcessMaker\BusinessModel\Cases();
|
||||
$cases->deleteCase($cas_uid);
|
||||
$cases->deleteCase($cas_uid, $usr_uid);
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
</head>
|
||||
<body onresize="resizingFrame();">
|
||||
<!--<div class="ui-layout-north">-->
|
||||
<div class="loader"></div>
|
||||
<section class="navBar" id="idNavBar">
|
||||
<div class="head"></div>
|
||||
<nav>
|
||||
|
||||
@@ -1402,7 +1402,11 @@ importProcessBpmnSubmit = function () {
|
||||
return;
|
||||
}
|
||||
Ext.getCmp('importProcessWindow').close();
|
||||
window.location.href = "../designer?prj_uid=" + resp_.prj_uid;
|
||||
if (typeof(importProcessGlobal.processFileType) != "undefined" && importProcessGlobal.processFileType == "bpmn") {
|
||||
openWindowIfIE("../designer?prj_uid=" + resp_.prj_uid);
|
||||
} else {
|
||||
window.location.href = "processes_Map?PRO_UID=" + resp_.prj_uid;
|
||||
}
|
||||
},
|
||||
failure: function (o, resp) {
|
||||
Ext.getCmp('importProcessWindow').close();
|
||||
|
||||
@@ -25,13 +25,32 @@
|
||||
document.getElementById('pm_submenu').style.display = 'none';
|
||||
document.documentElement.style.overflowY = 'hidden';
|
||||
function autoResizeScreen() {
|
||||
oCasesFrame = document.getElementById('frameMain');
|
||||
oClientWinSize = getClientWindowSize();
|
||||
height = oClientWinSize.height-105;
|
||||
oCasesFrame.style.height = height;
|
||||
if (oCasesFrame.height ) {
|
||||
oCasesFrame.height = height;
|
||||
}
|
||||
var containerList1, containerList2;
|
||||
oCasesFrame = document.getElementById('frameMain');
|
||||
containerList1 = document.getElementById("pm_header");
|
||||
if (document.getElementById("mainMenuBG") &&
|
||||
document.getElementById("mainMenuBG").parentNode &&
|
||||
document.getElementById("mainMenuBG").parentNode.parentNode &&
|
||||
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode &&
|
||||
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode
|
||||
){
|
||||
containerList2 = document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode;
|
||||
}
|
||||
if (containerList1 === containerList2) {
|
||||
height = oClientWinSize.height - containerList1.clientHeight;
|
||||
oCasesFrame.style.height = height;
|
||||
if (oCasesFrame.height ) {
|
||||
oCasesFrame.height = height;
|
||||
}
|
||||
} else {
|
||||
oCasesFrame = document.getElementById('frameMain');
|
||||
oClientWinSize = getClientWindowSize();
|
||||
height = oClientWinSize.height-105;
|
||||
oCasesFrame.style.height = height;
|
||||
if (oCasesFrame.height ) {
|
||||
oCasesFrame.height = height;
|
||||
}
|
||||
}
|
||||
//oCasesSubFrame = oCasesFrame.contentWindow.document.getElementById('casesSubFrame');
|
||||
//oCasesSubFrame.style.height = height-10;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<USR_USERNAME type="text" size="30" maxlength="50" required="true" validate="Any" autocomplete="0">
|
||||
<en><![CDATA[User]]></en>
|
||||
</USR_USERNAME>
|
||||
<USR_EMAIL type="text" size="30" required="true" maxlength="254" autocomplete="0">
|
||||
<USR_EMAIL type="text" size="30" required="true" maxlength="100" autocomplete="0">
|
||||
<en><![CDATA[Email]]></en>
|
||||
</USR_EMAIL>
|
||||
<URL type="hidden"/>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{$form.updateButton}
|
||||
</fieldset>
|
||||
|
||||
<div class="FormRequiredTextMessage"><font color="red">* </font>Required Field</div> </div>
|
||||
<div class="FormRequiredTextMessage"></div>
|
||||
<div class="boxBottom"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
Reference in New Issue
Block a user