Merged develop into bugfix/HOR-3295
This commit is contained in:
@@ -1980,6 +1980,12 @@ class AppSolr
|
||||
}
|
||||
else {
|
||||
foreach ($UnSerializedCaseData as $k => $value) {
|
||||
//This validation is only for the 'checkbox' control for the BPMN forms,
|
||||
//the request is not made to the database to obtain the control
|
||||
//associated with the variable so as not to decrease the performance.
|
||||
if (is_array($value) && count($value) === 1 && isset($value[0]) && !is_object($value[0]) && !is_array($value[0])) {
|
||||
$value = $value[0];
|
||||
}
|
||||
if (! is_array ($value) && ! is_object ($value) && $value != '' && $k != 'SYS_LANG' && $k != 'SYS_SKIN' && $k != 'SYS_SYS') {
|
||||
// search the field type in array of dynaform fields
|
||||
if (! empty ($dynaformFieldTypes) && array_key_exists (trim ($k), $dynaformFieldTypes)) {
|
||||
@@ -2912,19 +2918,20 @@ class AppSolr
|
||||
$oAppSolrQueue->createUpdate ($AppUid, $traceData, $updated);
|
||||
}
|
||||
|
||||
private function getCurrentTraceInfo()
|
||||
{
|
||||
$resultTraceString = "";
|
||||
|
||||
//
|
||||
$traceData = debug_backtrace();
|
||||
foreach ($traceData as $key => $value) {
|
||||
if($value['function'] != 'getCurrentTraceInfo' && $value['function'] != 'require_once')
|
||||
$resultTraceString .= $value['file'] . " (" . $value['line'] . ") " . $value['function'] . "\n";
|
||||
private function getCurrentTraceInfo()
|
||||
{
|
||||
$resultTraceString = "";
|
||||
$traceData = debug_backtrace();
|
||||
foreach ($traceData as $key => $value) {
|
||||
if ($value['function'] != 'getCurrentTraceInfo' && $value['function'] != 'require_once') {
|
||||
if (isset($value['file']) && isset($value['line']) && isset($value['function'])) {
|
||||
$resultTraceString .= $value['file'] . " (" . $value['line'] . ") " . $value['function'] . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $resultTraceString;
|
||||
}
|
||||
return $resultTraceString;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update application records in Solr that are stored in APP_SOLR_QUEUE table
|
||||
*/
|
||||
|
||||
@@ -1152,7 +1152,9 @@ class Cases
|
||||
//Logger deleteCase
|
||||
$nameFiles = '';
|
||||
foreach (debug_backtrace() as $node) {
|
||||
$nameFiles .= $node['file'] . ":" . $node['function'] . "(" . $node['line'] . ")\n";
|
||||
if (isset($node['file']) && isset($node['function']) && isset($node['line'])) {
|
||||
$nameFiles .= $node['file'] . ":" . $node['function'] . "(" . $node['line'] . ")\n";
|
||||
}
|
||||
}
|
||||
$dataLog = \Bootstrap::getDefaultContextLog();
|
||||
$dataLog['usrUid'] = isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : G::LoadTranslation('UID_UNDEFINED_USER');
|
||||
|
||||
@@ -1033,38 +1033,7 @@ class Derivation
|
||||
Bootstrap::registerMonolog('CaseDerivation', 200, 'Case Derivation', $aContext, $this->sysSys, 'processmaker.log');
|
||||
break;
|
||||
case TASK_FINISH_TASK:
|
||||
$iAppThreadIndex = $appFields['DEL_THREAD'];
|
||||
$this->case->closeAppThread($currentDelegation['APP_UID'], $iAppThreadIndex);
|
||||
if (isset($nextDel["TAS_UID_DUMMY"])) {
|
||||
$criteria = new Criteria("workflow");
|
||||
$criteria->addSelectColumn(RoutePeer::TAS_UID);
|
||||
$criteria->addJoin(RoutePeer::TAS_UID, AppDelegationPeer::TAS_UID);
|
||||
$criteria->add(RoutePeer::PRO_UID, $appFields['PRO_UID']);
|
||||
$criteria->add(RoutePeer::ROU_NEXT_TASK, isset($nextDel['ROU_PREVIOUS_TASK']) ? $nextDel['ROU_PREVIOUS_TASK'] : '');
|
||||
$criteria->add(RoutePeer::ROU_TYPE, isset($nextDel['ROU_PREVIOUS_TYPE']) ? $nextDel['ROU_PREVIOUS_TYPE'] : '');
|
||||
$criteria->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');
|
||||
$rsCriteria = RoutePeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$executeEvent = ($rsCriteria->next()) ? false : true;
|
||||
|
||||
$multiInstanceCompleted = true;
|
||||
if ($flagTaskAssignTypeIsMultipleInstance) {
|
||||
$multiInstanceCompleted = $this->case->multiInstanceIsCompleted(
|
||||
$appFields['APP_UID'],
|
||||
$appFields['TAS_UID'],
|
||||
$appFields['DEL_PREVIOUS']);
|
||||
}
|
||||
|
||||
$taskDummy = TaskPeer::retrieveByPK($nextDel["TAS_UID_DUMMY"]);
|
||||
if (preg_match("/^(?:END-MESSAGE-EVENT|END-EMAIL-EVENT)$/", $taskDummy->getTasType())
|
||||
&& $multiInstanceCompleted && $executeEvent
|
||||
) {
|
||||
$this->executeEvent($nextDel["TAS_UID_DUMMY"], $appFields, $flagFirstIteration, true);
|
||||
}
|
||||
}
|
||||
$aContext['action'] = 'finish-task';
|
||||
//Logger
|
||||
Bootstrap::registerMonolog('CaseDerivation', 200, 'Case Derivation', $aContext, $this->sysSys, 'processmaker.log');
|
||||
$this->finishTask($currentDelegation, $nextDel, $appFields, $flagFirstIteration, $flagTaskAssignTypeIsMultipleInstance, $aContext);
|
||||
break;
|
||||
default:
|
||||
//Get all siblingThreads
|
||||
@@ -1348,7 +1317,7 @@ class Derivation
|
||||
/* Start Block : Count the open threads of $currentDelegation['APP_UID'] */
|
||||
$openThreads = $this->case->GetOpenThreads( $currentDelegation['APP_UID'] );
|
||||
|
||||
$flag = false;
|
||||
$flagUpdateCase = false;
|
||||
|
||||
//check if there is any paused thread
|
||||
|
||||
@@ -1364,18 +1333,24 @@ class Derivation
|
||||
$appFields["APP_STATUS"] = "COMPLETED";
|
||||
$appFields["APP_FINISH_DATE"] = "now";
|
||||
$this->verifyIsCaseChild($currentDelegation["APP_UID"], $currentDelegation["DEL_INDEX"]);
|
||||
$flag = true;
|
||||
$flagUpdateCase = true;
|
||||
|
||||
}
|
||||
|
||||
if (isset( $iNewDelIndex )) {
|
||||
//The variable $iNewDelIndex will be true if we created a new index the variable
|
||||
if (isset($iNewDelIndex)) {
|
||||
$appFields["DEL_INDEX"] = $iNewDelIndex;
|
||||
$appFields["TAS_UID"] = $nextDel["TAS_UID"];
|
||||
|
||||
$flag = true;
|
||||
$excludeTasUid = array(TASK_FINISH_PROCESS, TASK_FINISH_TASK);
|
||||
//If the last TAS_UID value is not valid we will check for the valid TAS_UID value
|
||||
if (in_array($nextDel["TAS_UID"], $excludeTasUid) && is_array($arrayDerivationResult) && isset(current($arrayDerivationResult)["TAS_UID"])) {
|
||||
$appFields["TAS_UID"] = current($arrayDerivationResult)["TAS_UID"];
|
||||
} else {
|
||||
$appFields["TAS_UID"] = $nextDel["TAS_UID"];
|
||||
}
|
||||
$flagUpdateCase = true;
|
||||
}
|
||||
|
||||
if ($flag) {
|
||||
if ($flagUpdateCase) {
|
||||
//Start Block : UPDATES APPLICATION
|
||||
$this->case->updateCase( $currentDelegation["APP_UID"], $appFields );
|
||||
//End Block : UPDATES APPLICATION
|
||||
@@ -2009,4 +1984,47 @@ class Derivation
|
||||
\G::log(G::loadTranslation('ID_NOTIFICATION_ERROR') . '|' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param array $currentDelegation
|
||||
* @param array $nextDel
|
||||
* @param array $appFields
|
||||
* @param boolean $flagFirstIteration
|
||||
* @param boolean $flagTaskAssignTypeIsMultipleInstance
|
||||
* @param array $aContext
|
||||
* @return void
|
||||
*/
|
||||
public function finishTask($currentDelegation, $nextDel, $appFields, $flagFirstIteration = true, $flagTaskAssignTypeIsMultipleInstance = false, $aContext = array()) {
|
||||
$iAppThreadIndex = $appFields['DEL_THREAD'];
|
||||
$this->case->closeAppThread($currentDelegation['APP_UID'], $iAppThreadIndex);
|
||||
if (isset($nextDel["TAS_UID_DUMMY"])) {
|
||||
$criteria = new Criteria("workflow");
|
||||
$criteria->addSelectColumn(RoutePeer::TAS_UID);
|
||||
$criteria->addJoin(RoutePeer::TAS_UID, AppDelegationPeer::TAS_UID);
|
||||
$criteria->add(RoutePeer::PRO_UID, $appFields['PRO_UID']);
|
||||
$criteria->add(RoutePeer::ROU_NEXT_TASK, isset($nextDel['ROU_PREVIOUS_TASK']) ? $nextDel['ROU_PREVIOUS_TASK'] : '');
|
||||
$criteria->add(RoutePeer::ROU_TYPE, isset($nextDel['ROU_PREVIOUS_TYPE']) ? $nextDel['ROU_PREVIOUS_TYPE'] : '');
|
||||
$criteria->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');
|
||||
$rsCriteria = RoutePeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$executeEvent = ($rsCriteria->next()) ? false : true;
|
||||
|
||||
$multiInstanceCompleted = true;
|
||||
if ($flagTaskAssignTypeIsMultipleInstance) {
|
||||
$multiInstanceCompleted = $this->case->multiInstanceIsCompleted(
|
||||
$appFields['APP_UID'],
|
||||
$appFields['TAS_UID'],
|
||||
$appFields['DEL_PREVIOUS']);
|
||||
}
|
||||
|
||||
$taskDummy = TaskPeer::retrieveByPK($nextDel["TAS_UID_DUMMY"]);
|
||||
if (preg_match("/^(?:END-MESSAGE-EVENT|END-EMAIL-EVENT)$/", $taskDummy->getTasType())
|
||||
&& $multiInstanceCompleted && $executeEvent
|
||||
) {
|
||||
$this->executeEvent($nextDel["TAS_UID_DUMMY"], $appFields, $flagFirstIteration, true);
|
||||
}
|
||||
}
|
||||
$aContext['action'] = 'finish-task';
|
||||
//Logger
|
||||
Bootstrap::registerMonolog('CaseDerivation', 200, 'Case Derivation', $aContext, $this->sysSys, 'processmaker.log');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2227,6 +2227,11 @@ function PMFCreateUser ($userId, $password, $firstname, $lastname, $email, $role
|
||||
$ws = new wsBase();
|
||||
$result = $ws->createUser( $userId, $firstname, $lastname, $email, $role, $password, $dueDate, $status );
|
||||
|
||||
//When the user is created the $result parameter is an array, in other case is a object exception
|
||||
if (!is_object($result)) {
|
||||
$result = (object)$result;
|
||||
}
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
return 1;
|
||||
} else {
|
||||
|
||||
@@ -67,7 +67,7 @@ class pmLicenseManager
|
||||
$this->id = $results ['ID'];
|
||||
$this->expireIn = $this->getExpireIn ();
|
||||
$this->features = $this->result!='TMINUS'?isset($results ['DATA']['CUSTOMER_PLUGIN'])? $results ['DATA']['CUSTOMER_PLUGIN'] : $this->getActiveFeatures() : array();
|
||||
$this->licensedfeatures = $this->result!='TMINUS'?isset($results ['DATA']['CUSTOMER_LICENSED_FEATURES'])? $results ['DATA']['CUSTOMER_LICENSED_FEATURES'] : array() : array();
|
||||
$this->licensedfeatures = $this->result != 'TMINUS' ? (isset($results ['DATA']['CUSTOMER_LICENSED_FEATURES']) && is_array($results ['DATA']['CUSTOMER_LICENSED_FEATURES'])) ? $results ['DATA']['CUSTOMER_LICENSED_FEATURES'] : array() : array();
|
||||
$this->licensedfeaturesList = isset($results ['DATA']['LICENSED_FEATURES_LIST'])? $results ['DATA']['LICENSED_FEATURES_LIST'] : null;
|
||||
$this->status = $this->getCurrentLicenseStatus ();
|
||||
|
||||
|
||||
@@ -25,23 +25,14 @@ G::LoadClass ('pmFunctions');
|
||||
$RBAC = RBAC::getSingleton();
|
||||
$RBAC->initRBAC();
|
||||
$res = false;
|
||||
$server = $_SERVER['SERVER_SOFTWARE'];
|
||||
$webserver = explode("/", $server);
|
||||
if(isset($_SERVER['REMOTE_USER']) && $_SERVER['REMOTE_USER'] !=''){
|
||||
// IIS Verification
|
||||
if (!is_array($webserver) || (is_array($webserver) && ($webserver[0] == 'Microsoft-IIS'))){
|
||||
$userFull = $_SERVER['REMOTE_USER'];
|
||||
$userPN = explode("\\", $userFull);
|
||||
if (is_array($userPN)){
|
||||
$user = $userPN[1];
|
||||
} else {
|
||||
$user = $userFull;
|
||||
}
|
||||
$userFull = $_SERVER['REMOTE_USER'];
|
||||
$userPN = explode("\\", $userFull);
|
||||
if (is_array($userPN)){
|
||||
$user = $userPN[1];
|
||||
} else {
|
||||
$userFull = $_SERVER['REMOTE_USER'];
|
||||
$user = $_SERVER['REMOTE_USER'];
|
||||
$user = $userFull;
|
||||
}
|
||||
// End IIS Verification
|
||||
|
||||
$resVerifyUser = $RBAC->verifyUser($user);
|
||||
if ($resVerifyUser == 0) {
|
||||
|
||||
@@ -1986,7 +1986,7 @@ class wsBase
|
||||
|
||||
$task = TaskPeer::retrieveByPK($taskId);
|
||||
|
||||
$arrayTaskTypeToExclude = array("START-TIMER-EVENT");
|
||||
$arrayTaskTypeToExclude = array("START-TIMER-EVENT", "START-MESSAGE-EVENT");
|
||||
|
||||
if (!is_null($task) && !in_array($task->getTasType(), $arrayTaskTypeToExclude) && $founded == "") {
|
||||
$result = new wsResponse( 14, G::LoadTranslation( 'ID_TASK_INVALID_USER_NOT_ASSIGNED_TASK' ) );
|
||||
|
||||
@@ -2600,34 +2600,91 @@ class workspaceTools
|
||||
CLI::logging("> Completed table LIST_PARTICIPATED_LAST\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* This function overwrite the table LIST_PAUSED
|
||||
* Get the principal information in the tables appDelay, appDelegation
|
||||
* For the labels we use the tables user, process, task and application
|
||||
* @return void
|
||||
*/
|
||||
public function regenerateListPaused(){
|
||||
$delaycriteria = new Criteria("workflow");
|
||||
$delaycriteria->addSelectColumn(AppDelayPeer::APP_UID);
|
||||
$delaycriteria->addSelectColumn(AppDelayPeer::PRO_UID);
|
||||
$delaycriteria->addSelectColumn(AppDelayPeer::APP_DEL_INDEX);
|
||||
$delaycriteria->addSelectColumn(AppDelayPeer::APP_DISABLE_ACTION_DATE);
|
||||
$delaycriteria->addSelectColumn(AppCacheViewPeer::APP_NUMBER);
|
||||
$delaycriteria->addSelectColumn(AppCacheViewPeer::USR_UID);
|
||||
$delaycriteria->addSelectColumn(AppCacheViewPeer::APP_STATUS);
|
||||
$delaycriteria->addSelectColumn(AppCacheViewPeer::TAS_UID);
|
||||
$delaycriteria->addSelectColumn(AppCacheViewPeer::DEL_DELEGATE_DATE);
|
||||
|
||||
$delaycriteria->addJoin( AppCacheViewPeer::APP_UID, AppDelayPeer::APP_UID . ' AND ' . AppCacheViewPeer::DEL_INDEX . ' = ' . AppDelayPeer::APP_DEL_INDEX, Criteria::INNER_JOIN );
|
||||
$delaycriteria->add(AppDelayPeer::APP_DISABLE_ACTION_USER, "0", CRITERIA::EQUAL);
|
||||
$delaycriteria->add(AppDelayPeer::APP_TYPE, "PAUSE", CRITERIA::EQUAL);
|
||||
$rsCriteria = AppDelayPeer::doSelectRS($delaycriteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
$data = $row;
|
||||
$data["DEL_INDEX"] = $row["APP_DEL_INDEX"];
|
||||
$data["APP_RESTART_DATE"] = $row["APP_DISABLE_ACTION_DATE"];
|
||||
$listPaused = new ListPaused();
|
||||
$listPaused ->remove($row["APP_UID"],$row["APP_DEL_INDEX"],$data);
|
||||
$listPaused->setDeleted(false);
|
||||
$listPaused->create($data);
|
||||
}
|
||||
$this->initPropel(true);
|
||||
$query = 'INSERT INTO '.$this->dbName.'.LIST_PAUSED
|
||||
(
|
||||
APP_UID,
|
||||
DEL_INDEX,
|
||||
USR_UID,
|
||||
TAS_UID,
|
||||
PRO_UID,
|
||||
APP_NUMBER,
|
||||
APP_TITLE,
|
||||
APP_PRO_TITLE,
|
||||
APP_TAS_TITLE,
|
||||
APP_PAUSED_DATE,
|
||||
APP_RESTART_DATE,
|
||||
DEL_PREVIOUS_USR_UID,
|
||||
DEL_PREVIOUS_USR_USERNAME,
|
||||
DEL_PREVIOUS_USR_FIRSTNAME,
|
||||
DEL_PREVIOUS_USR_LASTNAME,
|
||||
DEL_CURRENT_USR_USERNAME,
|
||||
DEL_CURRENT_USR_FIRSTNAME,
|
||||
DEL_CURRENT_USR_LASTNAME,
|
||||
DEL_DELEGATE_DATE,
|
||||
DEL_INIT_DATE,
|
||||
DEL_DUE_DATE,
|
||||
DEL_PRIORITY,
|
||||
PRO_ID,
|
||||
USR_ID,
|
||||
TAS_ID
|
||||
)
|
||||
SELECT
|
||||
AD1.APP_UID,
|
||||
AD1.DEL_INDEX,
|
||||
AD1.USR_UID,
|
||||
AD1.TAS_UID,
|
||||
AD1.PRO_UID,
|
||||
AD1.APP_NUMBER,
|
||||
APPLICATION.APP_TITLE,
|
||||
PROCESS.PRO_TITLE,
|
||||
TASK.TAS_TITLE,
|
||||
APP_DELAY.APP_ENABLE_ACTION_DATE AS APP_PAUSED_DATE ,
|
||||
APP_DELAY.APP_DISABLE_ACTION_DATE AS APP_RESTART_DATE,
|
||||
AD2.USR_UID AS DEL_PREVIOUS_USR_UID,
|
||||
PREVIOUS.USR_USERNAME AS DEL_PREVIOUS_USR_USERNAME,
|
||||
PREVIOUS.USR_FIRSTNAME AS DEL_CURRENT_USR_FIRSTNAME,
|
||||
PREVIOUS.USR_LASTNAME AS DEL_PREVIOUS_USR_LASTNAME,
|
||||
USERS.USR_USERNAME AS DEL_CURRENT_USR_USERNAME,
|
||||
USERS.USR_FIRSTNAME AS DEL_CURRENT_USR_FIRSTNAME,
|
||||
USERS.USR_LASTNAME AS DEL_CURRENT_USR_LASTNAME,
|
||||
AD1.DEL_DELEGATE_DATE AS DEL_DELEGATE_DATE,
|
||||
AD1.DEL_INIT_DATE AS DEL_INIT_DATE,
|
||||
AD1.DEL_TASK_DUE_DATE AS DEL_DUE_DATE,
|
||||
AD1.DEL_PRIORITY AS DEL_PRIORITY,
|
||||
PROCESS.PRO_ID,
|
||||
USERS.USR_ID,
|
||||
TASK.TAS_ID
|
||||
FROM
|
||||
'.$this->dbName.'.APP_DELAY
|
||||
LEFT JOIN
|
||||
'.$this->dbName.'.APP_DELEGATION AS AD1 ON (APP_DELAY.APP_NUMBER = AD1.APP_NUMBER AND AD1.DEL_INDEX = APP_DELAY.APP_DEL_INDEX)
|
||||
LEFT JOIN
|
||||
'.$this->dbName.'.APP_DELEGATION AS AD2 ON (AD1.APP_NUMBER = AD2.APP_NUMBER AND AD1.DEL_PREVIOUS = AD2.DEL_INDEX)
|
||||
LEFT JOIN
|
||||
'.$this->dbName.'.USERS ON (APP_DELAY.APP_DELEGATION_USER_ID = USERS.USR_ID)
|
||||
LEFT JOIN
|
||||
'.$this->dbName.'.USERS PREVIOUS ON (AD2.USR_ID = PREVIOUS.USR_ID)
|
||||
LEFT JOIN
|
||||
'.$this->dbName.'.APPLICATION ON (AD1.APP_NUMBER = APPLICATION.APP_NUMBER)
|
||||
LEFT JOIN
|
||||
'.$this->dbName.'.PROCESS ON (AD1.PRO_ID = PROCESS.PRO_ID)
|
||||
LEFT JOIN
|
||||
'.$this->dbName.'.TASK ON (AD1.TAS_ID = TASK.TAS_ID)
|
||||
WHERE
|
||||
APP_DELAY.APP_DISABLE_ACTION_USER = "0" AND
|
||||
APP_DELAY.APP_TYPE = "PAUSE"
|
||||
';
|
||||
$con = Propel::getConnection("workflow");
|
||||
$stmt = $con->createStatement();
|
||||
$stmt->executeQuery($query);
|
||||
CLI::logging("> Completed table LIST_PAUSED\n");
|
||||
}
|
||||
|
||||
@@ -3559,7 +3616,7 @@ class workspaceTools
|
||||
CLI::logging("-> Migrating Self-Service by Value Cases \n");
|
||||
while ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
$temp = unserialize($row['GRP_UID']);
|
||||
$temp = @unserialize($row['GRP_UID']);
|
||||
if (is_array($temp)) {
|
||||
foreach($temp as $groupUid) {
|
||||
if ($groupUid != '') {
|
||||
@@ -3668,6 +3725,48 @@ class workspaceTools
|
||||
APP_STATUS_ID = 0");
|
||||
$con->commit();
|
||||
|
||||
// Populating APP_DELAY.USR_ID
|
||||
CLI::logging("-> Populating APP_DELAY.USR_ID \n");
|
||||
$con->begin();
|
||||
$stmt = $con->createStatement();
|
||||
$rs = $stmt->executeQuery("UPDATE APP_DELAY AS AD
|
||||
INNER JOIN (
|
||||
SELECT USERS.USR_UID, USERS.USR_ID
|
||||
FROM USERS
|
||||
) AS USR
|
||||
ON (AD.APP_DELEGATION_USER = USR.USR_UID)
|
||||
SET AD.APP_DELEGATION_USER_ID = USR.USR_ID
|
||||
WHERE AD.APP_DELEGATION_USER_ID = 0");
|
||||
$con->commit();
|
||||
|
||||
// Populating APP_DELAY.PRO_ID
|
||||
CLI::logging("-> Populating APP_DELAY.PRO_ID \n");
|
||||
$con->begin();
|
||||
$stmt = $con->createStatement();
|
||||
$rs = $stmt->executeQuery("UPDATE APP_DELAY AS AD
|
||||
INNER JOIN (
|
||||
SELECT PROCESS.PRO_UID, PROCESS.PRO_ID
|
||||
FROM PROCESS
|
||||
) AS PRO
|
||||
ON (AD.PRO_UID = PRO.PRO_UID)
|
||||
SET AD.PRO_ID = PRO.PRO_ID
|
||||
WHERE AD.PRO_ID = 0");
|
||||
$con->commit();
|
||||
|
||||
// Populating APP_DELAY.APP_NUMBER
|
||||
CLI::logging("-> Populating APP_DELAY.APP_NUMBER \n");
|
||||
$con->begin();
|
||||
$stmt = $con->createStatement();
|
||||
$rs = $stmt->executeQuery("UPDATE APP_DELAY AS AD
|
||||
INNER JOIN (
|
||||
SELECT APPLICATION.APP_UID, APPLICATION.APP_NUMBER
|
||||
FROM APPLICATION
|
||||
) AS APP
|
||||
ON (AD.APP_UID = APP.APP_UID)
|
||||
SET AD.APP_NUMBER = APP.APP_NUMBER
|
||||
WHERE AD.APP_NUMBER = 0");
|
||||
$con->commit();
|
||||
|
||||
CLI::logging("-> Migrating And Populating Indexing for avoiding the use of table APP_CACHE_VIEW Done \n");
|
||||
|
||||
// Populating PRO_ID, USR_ID
|
||||
|
||||
@@ -382,8 +382,11 @@ function getDynaformsVars ($sProcessUID, $typeVars = 'all', $bIncMulSelFields =
|
||||
foreach ($aAux as $sName => $sValue) {
|
||||
$aFields[] = array ('sName' => $sName,'sType' => 'system','sLabel' => G::LoadTranslation('ID_TINY_SYSTEM_VARIABLES'));
|
||||
}
|
||||
//we're adding the ping variable to the system list
|
||||
//we're adding the pin variable to the system list
|
||||
$aFields[] = array ('sName' => 'PIN','sType' => 'system','sLabel' => G::LoadTranslation('ID_TINY_SYSTEM_VARIABLES'));
|
||||
|
||||
//we're adding the app_number variable to the system list
|
||||
$aFields[] = array('sName' => 'APP_NUMBER', 'sType' => 'system', 'sLabel' => G::LoadTranslation('ID_TINY_SYSTEM_VARIABLE'), 'sUid' => '');
|
||||
}
|
||||
|
||||
$aInvalidTypes = array("title", "subtitle", "file", "button", "reset", "submit", "javascript", "pmconnection");
|
||||
|
||||
@@ -167,12 +167,14 @@ class AppNotes extends BaseAppNotes
|
||||
$oCase = new Cases();
|
||||
$aFields = $oCase->loadCase( $appUid );
|
||||
$configNoteNotification['subject'] = G::LoadTranslation( 'ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION' ) . " @#APP_TITLE ";
|
||||
$configNoteNotification['body'] = G::LoadTranslation( 'ID_CASE' ) . ": @#APP_TITLE<br />" . G::LoadTranslation( 'ID_AUTHOR' ) . ": $authorName<br /><br />$noteContent";
|
||||
//Define the body for the notification
|
||||
$body = G::LoadTranslation('ID_CASE_TITLE') . ": @#APP_TITLE<br />";
|
||||
$body .= G::LoadTranslation('ID_CASE_NUMBER') . ": @#APP_NUMBER<br />";
|
||||
$body .= G::LoadTranslation('ID_AUTHOR') . ": $authorName<br /><br />$noteContent";
|
||||
$configNoteNotification['body'] = $body;
|
||||
|
||||
$sFrom = G::buildFrom($aConfiguration, $sFrom);
|
||||
|
||||
$sSubject = G::replaceDataField( $configNoteNotification['subject'], $aFields );
|
||||
|
||||
$sBody = nl2br( G::replaceDataField( $configNoteNotification['body'], $aFields ) );
|
||||
|
||||
G::LoadClass( 'spool' );
|
||||
|
||||
@@ -549,9 +549,17 @@ class ListInbox extends BaseListInbox
|
||||
$criteria->addJoin(ListInboxPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
||||
self::loadFilters($criteria, $filters, $additionalColumns);
|
||||
|
||||
$sort = (!empty($filters['sort'])) ?
|
||||
ListInboxPeer::TABLE_NAME.'.'.$filters['sort'] :
|
||||
"LIST_INBOX.APP_UPDATE_DATE";
|
||||
//We will be defined the sort
|
||||
$casesList = new \ProcessMaker\BusinessModel\Cases();
|
||||
$sort = $casesList->getSortColumn(
|
||||
__CLASS__ . 'Peer',
|
||||
BasePeer::TYPE_FIELDNAME,
|
||||
empty($filters['sort']) ? "APP_UPDATE_DATE" : $filters['sort'],
|
||||
"APP_UPDATE_DATE",
|
||||
$this->additionalClassName,
|
||||
$additionalColumns
|
||||
);
|
||||
|
||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||
@@ -624,7 +632,6 @@ class ListInbox extends BaseListInbox
|
||||
* Returns the number of cases of a user
|
||||
* @param string $usrUid
|
||||
* @param array $filters
|
||||
* @param string $status
|
||||
* @return int
|
||||
*/
|
||||
public function getCountList($usrUid, $filters = array())
|
||||
|
||||
@@ -364,9 +364,17 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
||||
|
||||
self::loadFilters($criteria, $filters, $additionalColumns);
|
||||
|
||||
$sort = (!empty($filters['sort'])) ?
|
||||
ListParticipatedLastPeer::TABLE_NAME.'.'.$filters['sort'] :
|
||||
'DEL_DELEGATE_DATE';
|
||||
//We will be defined the sort
|
||||
$casesList = new \ProcessMaker\BusinessModel\Cases();
|
||||
$sort = $casesList->getSortColumn(
|
||||
__CLASS__ . 'Peer',
|
||||
BasePeer::TYPE_FIELDNAME,
|
||||
empty($filters['sort']) ? "DEL_DELEGATE_DATE" : $filters['sort'],
|
||||
"DEL_DELEGATE_DATE",
|
||||
$this->additionalClassName,
|
||||
$additionalColumns
|
||||
);
|
||||
|
||||
$dir = isset($filters['dir']) ? $filters['dir'] : 'ASC';
|
||||
$start = isset($filters['start']) ? $filters['start'] : '0';
|
||||
$limit = isset($filters['limit']) ? $filters['limit'] : '25';
|
||||
|
||||
@@ -307,7 +307,17 @@ class ListPaused extends BaseListPaused
|
||||
$criteria->add(ListPausedPeer::USR_UID, $usr_uid, Criteria::EQUAL);
|
||||
self::loadFilters($criteria, $filters, $additionalColumns);
|
||||
|
||||
$sort = (!empty($filters['sort'])) ? ListPausedPeer::TABLE_NAME.'.'.$filters['sort'] : "APP_PAUSED_DATE";
|
||||
//We will be defined the sort
|
||||
$casesList = new \ProcessMaker\BusinessModel\Cases();
|
||||
$sort = $casesList->getSortColumn(
|
||||
__CLASS__ . 'Peer',
|
||||
BasePeer::TYPE_FIELDNAME,
|
||||
empty($filters['sort']) ? "APP_PAUSED_DATE" : $filters['sort'],
|
||||
"APP_PAUSED_DATE",
|
||||
$this->additionalClassName,
|
||||
$additionalColumns
|
||||
);
|
||||
|
||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||
|
||||
@@ -301,9 +301,18 @@ class ListUnassigned extends BaseListUnassigned
|
||||
|
||||
//Apply some filters
|
||||
self::loadFilters($criteria, $filters, $additionalColumns);
|
||||
$sort = (!empty($filters['sort'])) ?
|
||||
ListUnassignedPeer::TABLE_NAME.'.'.$filters['sort'] :
|
||||
"LIST_UNASSIGNED.DEL_DELEGATE_DATE";
|
||||
|
||||
//We will be defined the sort
|
||||
$casesList = new \ProcessMaker\BusinessModel\Cases();
|
||||
$sort = $casesList->getSortColumn(
|
||||
__CLASS__ . 'Peer',
|
||||
BasePeer::TYPE_FIELDNAME,
|
||||
empty($filters['sort']) ? "DEL_DELEGATE_DATE" : $filters['sort'],
|
||||
"DEL_DELEGATE_DATE",
|
||||
$this->additionalClassName,
|
||||
$additionalColumns
|
||||
);
|
||||
|
||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||
|
||||
@@ -322,6 +322,7 @@ class ObjectPermission extends BaseObjectPermission
|
||||
public function objectPermissionByDynaform ($appUid, $opTaskSource = 0, $opObjUid = '', $statusCase = '')
|
||||
{
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn("*");
|
||||
$oCriteria->addJoin(ApplicationPeer::PRO_UID, StepPeer::PRO_UID);
|
||||
$oCriteria->addJoin(StepPeer::STEP_UID_OBJ, DynaformPeer::DYN_UID);
|
||||
$oCriteria->add(ApplicationPeer::APP_UID, $appUid);
|
||||
@@ -334,7 +335,6 @@ class ObjectPermission extends BaseObjectPermission
|
||||
if ($opObjUid != '' && $opObjUid != '0') {
|
||||
$oCriteria->add(DynaformPeer::DYN_UID, $opObjUid);
|
||||
}
|
||||
|
||||
$oCriteria->addAscendingOrderByColumn(StepPeer::STEP_POSITION);
|
||||
$oCriteria->setDistinct();
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ class AppDelayMapBuilder
|
||||
|
||||
$tMap->addColumn('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, false, null);
|
||||
|
||||
$tMap->addColumn('APP_THREAD_INDEX', 'AppThreadIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('APP_DEL_INDEX', 'AppDelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
@@ -93,6 +95,10 @@ class AppDelayMapBuilder
|
||||
|
||||
$tMap->addColumn('APP_AUTOMATIC_DISABLED_DATE', 'AppAutomaticDisabledDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('APP_DELEGATION_USER_ID', 'AppDelegationUserId', 'int', CreoleTypes::INTEGER, false, null);
|
||||
|
||||
$tMap->addColumn('PRO_ID', 'ProId', 'int', CreoleTypes::INTEGER, false, null);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // AppDelayMapBuilder
|
||||
|
||||
@@ -45,6 +45,12 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $app_uid = '0';
|
||||
|
||||
/**
|
||||
* The value for the app_number field.
|
||||
* @var int
|
||||
*/
|
||||
protected $app_number = 0;
|
||||
|
||||
/**
|
||||
* The value for the app_thread_index field.
|
||||
* @var int
|
||||
@@ -111,6 +117,18 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $app_automatic_disabled_date;
|
||||
|
||||
/**
|
||||
* The value for the app_delegation_user_id field.
|
||||
* @var int
|
||||
*/
|
||||
protected $app_delegation_user_id = 0;
|
||||
|
||||
/**
|
||||
* The value for the pro_id field.
|
||||
* @var int
|
||||
*/
|
||||
protected $pro_id = 0;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
@@ -158,6 +176,17 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
return $this->app_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [app_number] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getAppNumber()
|
||||
{
|
||||
|
||||
return $this->app_number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [app_thread_index] column value.
|
||||
*
|
||||
@@ -342,6 +371,28 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [app_delegation_user_id] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getAppDelegationUserId()
|
||||
{
|
||||
|
||||
return $this->app_delegation_user_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [pro_id] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getProId()
|
||||
{
|
||||
|
||||
return $this->pro_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [app_delay_uid] column.
|
||||
*
|
||||
@@ -408,6 +459,28 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
|
||||
} // setAppUid()
|
||||
|
||||
/**
|
||||
* Set the value of [app_number] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setAppNumber($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is integer,
|
||||
// we will cast the input value to an int (if it is not).
|
||||
if ($v !== null && !is_int($v) && is_numeric($v)) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->app_number !== $v || $v === 0) {
|
||||
$this->app_number = $v;
|
||||
$this->modifiedColumns[] = AppDelayPeer::APP_NUMBER;
|
||||
}
|
||||
|
||||
} // setAppNumber()
|
||||
|
||||
/**
|
||||
* Set the value of [app_thread_index] column.
|
||||
*
|
||||
@@ -671,6 +744,50 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
|
||||
} // setAppAutomaticDisabledDate()
|
||||
|
||||
/**
|
||||
* Set the value of [app_delegation_user_id] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setAppDelegationUserId($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is integer,
|
||||
// we will cast the input value to an int (if it is not).
|
||||
if ($v !== null && !is_int($v) && is_numeric($v)) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->app_delegation_user_id !== $v || $v === 0) {
|
||||
$this->app_delegation_user_id = $v;
|
||||
$this->modifiedColumns[] = AppDelayPeer::APP_DELEGATION_USER_ID;
|
||||
}
|
||||
|
||||
} // setAppDelegationUserId()
|
||||
|
||||
/**
|
||||
* Set the value of [pro_id] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setProId($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is integer,
|
||||
// we will cast the input value to an int (if it is not).
|
||||
if ($v !== null && !is_int($v) && is_numeric($v)) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->pro_id !== $v || $v === 0) {
|
||||
$this->pro_id = $v;
|
||||
$this->modifiedColumns[] = AppDelayPeer::PRO_ID;
|
||||
}
|
||||
|
||||
} // setProId()
|
||||
|
||||
/**
|
||||
* Hydrates (populates) the object variables with values from the database resultset.
|
||||
*
|
||||
@@ -694,34 +811,40 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
|
||||
$this->app_uid = $rs->getString($startcol + 2);
|
||||
|
||||
$this->app_thread_index = $rs->getInt($startcol + 3);
|
||||
$this->app_number = $rs->getInt($startcol + 3);
|
||||
|
||||
$this->app_del_index = $rs->getInt($startcol + 4);
|
||||
$this->app_thread_index = $rs->getInt($startcol + 4);
|
||||
|
||||
$this->app_type = $rs->getString($startcol + 5);
|
||||
$this->app_del_index = $rs->getInt($startcol + 5);
|
||||
|
||||
$this->app_status = $rs->getString($startcol + 6);
|
||||
$this->app_type = $rs->getString($startcol + 6);
|
||||
|
||||
$this->app_next_task = $rs->getString($startcol + 7);
|
||||
$this->app_status = $rs->getString($startcol + 7);
|
||||
|
||||
$this->app_delegation_user = $rs->getString($startcol + 8);
|
||||
$this->app_next_task = $rs->getString($startcol + 8);
|
||||
|
||||
$this->app_enable_action_user = $rs->getString($startcol + 9);
|
||||
$this->app_delegation_user = $rs->getString($startcol + 9);
|
||||
|
||||
$this->app_enable_action_date = $rs->getTimestamp($startcol + 10, null);
|
||||
$this->app_enable_action_user = $rs->getString($startcol + 10);
|
||||
|
||||
$this->app_disable_action_user = $rs->getString($startcol + 11);
|
||||
$this->app_enable_action_date = $rs->getTimestamp($startcol + 11, null);
|
||||
|
||||
$this->app_disable_action_date = $rs->getTimestamp($startcol + 12, null);
|
||||
$this->app_disable_action_user = $rs->getString($startcol + 12);
|
||||
|
||||
$this->app_automatic_disabled_date = $rs->getTimestamp($startcol + 13, null);
|
||||
$this->app_disable_action_date = $rs->getTimestamp($startcol + 13, null);
|
||||
|
||||
$this->app_automatic_disabled_date = $rs->getTimestamp($startcol + 14, null);
|
||||
|
||||
$this->app_delegation_user_id = $rs->getInt($startcol + 15);
|
||||
|
||||
$this->pro_id = $rs->getInt($startcol + 16);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 14; // 14 = AppDelayPeer::NUM_COLUMNS - AppDelayPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 17; // 17 = AppDelayPeer::NUM_COLUMNS - AppDelayPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating AppDelay object", $e);
|
||||
@@ -935,38 +1058,47 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
return $this->getAppUid();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getAppThreadIndex();
|
||||
return $this->getAppNumber();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getAppDelIndex();
|
||||
return $this->getAppThreadIndex();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getAppType();
|
||||
return $this->getAppDelIndex();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getAppStatus();
|
||||
return $this->getAppType();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getAppNextTask();
|
||||
return $this->getAppStatus();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getAppDelegationUser();
|
||||
return $this->getAppNextTask();
|
||||
break;
|
||||
case 9:
|
||||
return $this->getAppEnableActionUser();
|
||||
return $this->getAppDelegationUser();
|
||||
break;
|
||||
case 10:
|
||||
return $this->getAppEnableActionDate();
|
||||
return $this->getAppEnableActionUser();
|
||||
break;
|
||||
case 11:
|
||||
return $this->getAppDisableActionUser();
|
||||
return $this->getAppEnableActionDate();
|
||||
break;
|
||||
case 12:
|
||||
return $this->getAppDisableActionDate();
|
||||
return $this->getAppDisableActionUser();
|
||||
break;
|
||||
case 13:
|
||||
return $this->getAppDisableActionDate();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getAppAutomaticDisabledDate();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getAppDelegationUserId();
|
||||
break;
|
||||
case 16:
|
||||
return $this->getProId();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -990,17 +1122,20 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
$keys[0] => $this->getAppDelayUid(),
|
||||
$keys[1] => $this->getProUid(),
|
||||
$keys[2] => $this->getAppUid(),
|
||||
$keys[3] => $this->getAppThreadIndex(),
|
||||
$keys[4] => $this->getAppDelIndex(),
|
||||
$keys[5] => $this->getAppType(),
|
||||
$keys[6] => $this->getAppStatus(),
|
||||
$keys[7] => $this->getAppNextTask(),
|
||||
$keys[8] => $this->getAppDelegationUser(),
|
||||
$keys[9] => $this->getAppEnableActionUser(),
|
||||
$keys[10] => $this->getAppEnableActionDate(),
|
||||
$keys[11] => $this->getAppDisableActionUser(),
|
||||
$keys[12] => $this->getAppDisableActionDate(),
|
||||
$keys[13] => $this->getAppAutomaticDisabledDate(),
|
||||
$keys[3] => $this->getAppNumber(),
|
||||
$keys[4] => $this->getAppThreadIndex(),
|
||||
$keys[5] => $this->getAppDelIndex(),
|
||||
$keys[6] => $this->getAppType(),
|
||||
$keys[7] => $this->getAppStatus(),
|
||||
$keys[8] => $this->getAppNextTask(),
|
||||
$keys[9] => $this->getAppDelegationUser(),
|
||||
$keys[10] => $this->getAppEnableActionUser(),
|
||||
$keys[11] => $this->getAppEnableActionDate(),
|
||||
$keys[12] => $this->getAppDisableActionUser(),
|
||||
$keys[13] => $this->getAppDisableActionDate(),
|
||||
$keys[14] => $this->getAppAutomaticDisabledDate(),
|
||||
$keys[15] => $this->getAppDelegationUserId(),
|
||||
$keys[16] => $this->getProId(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -1042,38 +1177,47 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
$this->setAppUid($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setAppThreadIndex($value);
|
||||
$this->setAppNumber($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setAppDelIndex($value);
|
||||
$this->setAppThreadIndex($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setAppType($value);
|
||||
$this->setAppDelIndex($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setAppStatus($value);
|
||||
$this->setAppType($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setAppNextTask($value);
|
||||
$this->setAppStatus($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setAppDelegationUser($value);
|
||||
$this->setAppNextTask($value);
|
||||
break;
|
||||
case 9:
|
||||
$this->setAppEnableActionUser($value);
|
||||
$this->setAppDelegationUser($value);
|
||||
break;
|
||||
case 10:
|
||||
$this->setAppEnableActionDate($value);
|
||||
$this->setAppEnableActionUser($value);
|
||||
break;
|
||||
case 11:
|
||||
$this->setAppDisableActionUser($value);
|
||||
$this->setAppEnableActionDate($value);
|
||||
break;
|
||||
case 12:
|
||||
$this->setAppDisableActionDate($value);
|
||||
$this->setAppDisableActionUser($value);
|
||||
break;
|
||||
case 13:
|
||||
$this->setAppDisableActionDate($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setAppAutomaticDisabledDate($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setAppDelegationUserId($value);
|
||||
break;
|
||||
case 16:
|
||||
$this->setProId($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -1110,47 +1254,59 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[3], $arr)) {
|
||||
$this->setAppThreadIndex($arr[$keys[3]]);
|
||||
$this->setAppNumber($arr[$keys[3]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[4], $arr)) {
|
||||
$this->setAppDelIndex($arr[$keys[4]]);
|
||||
$this->setAppThreadIndex($arr[$keys[4]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[5], $arr)) {
|
||||
$this->setAppType($arr[$keys[5]]);
|
||||
$this->setAppDelIndex($arr[$keys[5]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[6], $arr)) {
|
||||
$this->setAppStatus($arr[$keys[6]]);
|
||||
$this->setAppType($arr[$keys[6]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[7], $arr)) {
|
||||
$this->setAppNextTask($arr[$keys[7]]);
|
||||
$this->setAppStatus($arr[$keys[7]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[8], $arr)) {
|
||||
$this->setAppDelegationUser($arr[$keys[8]]);
|
||||
$this->setAppNextTask($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[9], $arr)) {
|
||||
$this->setAppEnableActionUser($arr[$keys[9]]);
|
||||
$this->setAppDelegationUser($arr[$keys[9]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[10], $arr)) {
|
||||
$this->setAppEnableActionDate($arr[$keys[10]]);
|
||||
$this->setAppEnableActionUser($arr[$keys[10]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[11], $arr)) {
|
||||
$this->setAppDisableActionUser($arr[$keys[11]]);
|
||||
$this->setAppEnableActionDate($arr[$keys[11]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[12], $arr)) {
|
||||
$this->setAppDisableActionDate($arr[$keys[12]]);
|
||||
$this->setAppDisableActionUser($arr[$keys[12]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[13], $arr)) {
|
||||
$this->setAppAutomaticDisabledDate($arr[$keys[13]]);
|
||||
$this->setAppDisableActionDate($arr[$keys[13]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[14], $arr)) {
|
||||
$this->setAppAutomaticDisabledDate($arr[$keys[14]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[15], $arr)) {
|
||||
$this->setAppDelegationUserId($arr[$keys[15]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[16], $arr)) {
|
||||
$this->setProId($arr[$keys[16]]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1176,6 +1332,10 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
$criteria->add(AppDelayPeer::APP_UID, $this->app_uid);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(AppDelayPeer::APP_NUMBER)) {
|
||||
$criteria->add(AppDelayPeer::APP_NUMBER, $this->app_number);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(AppDelayPeer::APP_THREAD_INDEX)) {
|
||||
$criteria->add(AppDelayPeer::APP_THREAD_INDEX, $this->app_thread_index);
|
||||
}
|
||||
@@ -1220,6 +1380,14 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
$criteria->add(AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE, $this->app_automatic_disabled_date);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(AppDelayPeer::APP_DELEGATION_USER_ID)) {
|
||||
$criteria->add(AppDelayPeer::APP_DELEGATION_USER_ID, $this->app_delegation_user_id);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(AppDelayPeer::PRO_ID)) {
|
||||
$criteria->add(AppDelayPeer::PRO_ID, $this->pro_id);
|
||||
}
|
||||
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -1278,6 +1446,8 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setAppUid($this->app_uid);
|
||||
|
||||
$copyObj->setAppNumber($this->app_number);
|
||||
|
||||
$copyObj->setAppThreadIndex($this->app_thread_index);
|
||||
|
||||
$copyObj->setAppDelIndex($this->app_del_index);
|
||||
@@ -1300,6 +1470,10 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setAppAutomaticDisabledDate($this->app_automatic_disabled_date);
|
||||
|
||||
$copyObj->setAppDelegationUserId($this->app_delegation_user_id);
|
||||
|
||||
$copyObj->setProId($this->pro_id);
|
||||
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseAppDelayPeer
|
||||
const CLASS_DEFAULT = 'classes.model.AppDelay';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 14;
|
||||
const NUM_COLUMNS = 17;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -40,6 +40,9 @@ abstract class BaseAppDelayPeer
|
||||
/** the column name for the APP_UID field */
|
||||
const APP_UID = 'APP_DELAY.APP_UID';
|
||||
|
||||
/** the column name for the APP_NUMBER field */
|
||||
const APP_NUMBER = 'APP_DELAY.APP_NUMBER';
|
||||
|
||||
/** the column name for the APP_THREAD_INDEX field */
|
||||
const APP_THREAD_INDEX = 'APP_DELAY.APP_THREAD_INDEX';
|
||||
|
||||
@@ -73,6 +76,12 @@ abstract class BaseAppDelayPeer
|
||||
/** the column name for the APP_AUTOMATIC_DISABLED_DATE field */
|
||||
const APP_AUTOMATIC_DISABLED_DATE = 'APP_DELAY.APP_AUTOMATIC_DISABLED_DATE';
|
||||
|
||||
/** the column name for the APP_DELEGATION_USER_ID field */
|
||||
const APP_DELEGATION_USER_ID = 'APP_DELAY.APP_DELEGATION_USER_ID';
|
||||
|
||||
/** the column name for the PRO_ID field */
|
||||
const PRO_ID = 'APP_DELAY.PRO_ID';
|
||||
|
||||
/** The PHP to DB Name Mapping */
|
||||
private static $phpNameMap = null;
|
||||
|
||||
@@ -84,10 +93,10 @@ abstract class BaseAppDelayPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('AppDelayUid', 'ProUid', 'AppUid', 'AppThreadIndex', 'AppDelIndex', 'AppType', 'AppStatus', 'AppNextTask', 'AppDelegationUser', 'AppEnableActionUser', 'AppEnableActionDate', 'AppDisableActionUser', 'AppDisableActionDate', 'AppAutomaticDisabledDate', ),
|
||||
BasePeer::TYPE_COLNAME => array (AppDelayPeer::APP_DELAY_UID, AppDelayPeer::PRO_UID, AppDelayPeer::APP_UID, AppDelayPeer::APP_THREAD_INDEX, AppDelayPeer::APP_DEL_INDEX, AppDelayPeer::APP_TYPE, AppDelayPeer::APP_STATUS, AppDelayPeer::APP_NEXT_TASK, AppDelayPeer::APP_DELEGATION_USER, AppDelayPeer::APP_ENABLE_ACTION_USER, AppDelayPeer::APP_ENABLE_ACTION_DATE, AppDelayPeer::APP_DISABLE_ACTION_USER, AppDelayPeer::APP_DISABLE_ACTION_DATE, AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_DELAY_UID', 'PRO_UID', 'APP_UID', 'APP_THREAD_INDEX', 'APP_DEL_INDEX', 'APP_TYPE', 'APP_STATUS', 'APP_NEXT_TASK', 'APP_DELEGATION_USER', 'APP_ENABLE_ACTION_USER', 'APP_ENABLE_ACTION_DATE', 'APP_DISABLE_ACTION_USER', 'APP_DISABLE_ACTION_DATE', 'APP_AUTOMATIC_DISABLED_DATE', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
|
||||
BasePeer::TYPE_PHPNAME => array ('AppDelayUid', 'ProUid', 'AppUid', 'AppNumber', 'AppThreadIndex', 'AppDelIndex', 'AppType', 'AppStatus', 'AppNextTask', 'AppDelegationUser', 'AppEnableActionUser', 'AppEnableActionDate', 'AppDisableActionUser', 'AppDisableActionDate', 'AppAutomaticDisabledDate', 'AppDelegationUserId', 'ProId', ),
|
||||
BasePeer::TYPE_COLNAME => array (AppDelayPeer::APP_DELAY_UID, AppDelayPeer::PRO_UID, AppDelayPeer::APP_UID, AppDelayPeer::APP_NUMBER, AppDelayPeer::APP_THREAD_INDEX, AppDelayPeer::APP_DEL_INDEX, AppDelayPeer::APP_TYPE, AppDelayPeer::APP_STATUS, AppDelayPeer::APP_NEXT_TASK, AppDelayPeer::APP_DELEGATION_USER, AppDelayPeer::APP_ENABLE_ACTION_USER, AppDelayPeer::APP_ENABLE_ACTION_DATE, AppDelayPeer::APP_DISABLE_ACTION_USER, AppDelayPeer::APP_DISABLE_ACTION_DATE, AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE, AppDelayPeer::APP_DELEGATION_USER_ID, AppDelayPeer::PRO_ID, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_DELAY_UID', 'PRO_UID', 'APP_UID', 'APP_NUMBER', 'APP_THREAD_INDEX', 'APP_DEL_INDEX', 'APP_TYPE', 'APP_STATUS', 'APP_NEXT_TASK', 'APP_DELEGATION_USER', 'APP_ENABLE_ACTION_USER', 'APP_ENABLE_ACTION_DATE', 'APP_DISABLE_ACTION_USER', 'APP_DISABLE_ACTION_DATE', 'APP_AUTOMATIC_DISABLED_DATE', 'APP_DELEGATION_USER_ID', 'PRO_ID', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -97,10 +106,10 @@ abstract class BaseAppDelayPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('AppDelayUid' => 0, 'ProUid' => 1, 'AppUid' => 2, 'AppThreadIndex' => 3, 'AppDelIndex' => 4, 'AppType' => 5, 'AppStatus' => 6, 'AppNextTask' => 7, 'AppDelegationUser' => 8, 'AppEnableActionUser' => 9, 'AppEnableActionDate' => 10, 'AppDisableActionUser' => 11, 'AppDisableActionDate' => 12, 'AppAutomaticDisabledDate' => 13, ),
|
||||
BasePeer::TYPE_COLNAME => array (AppDelayPeer::APP_DELAY_UID => 0, AppDelayPeer::PRO_UID => 1, AppDelayPeer::APP_UID => 2, AppDelayPeer::APP_THREAD_INDEX => 3, AppDelayPeer::APP_DEL_INDEX => 4, AppDelayPeer::APP_TYPE => 5, AppDelayPeer::APP_STATUS => 6, AppDelayPeer::APP_NEXT_TASK => 7, AppDelayPeer::APP_DELEGATION_USER => 8, AppDelayPeer::APP_ENABLE_ACTION_USER => 9, AppDelayPeer::APP_ENABLE_ACTION_DATE => 10, AppDelayPeer::APP_DISABLE_ACTION_USER => 11, AppDelayPeer::APP_DISABLE_ACTION_DATE => 12, AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE => 13, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_DELAY_UID' => 0, 'PRO_UID' => 1, 'APP_UID' => 2, 'APP_THREAD_INDEX' => 3, 'APP_DEL_INDEX' => 4, 'APP_TYPE' => 5, 'APP_STATUS' => 6, 'APP_NEXT_TASK' => 7, 'APP_DELEGATION_USER' => 8, 'APP_ENABLE_ACTION_USER' => 9, 'APP_ENABLE_ACTION_DATE' => 10, 'APP_DISABLE_ACTION_USER' => 11, 'APP_DISABLE_ACTION_DATE' => 12, 'APP_AUTOMATIC_DISABLED_DATE' => 13, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
|
||||
BasePeer::TYPE_PHPNAME => array ('AppDelayUid' => 0, 'ProUid' => 1, 'AppUid' => 2, 'AppNumber' => 3, 'AppThreadIndex' => 4, 'AppDelIndex' => 5, 'AppType' => 6, 'AppStatus' => 7, 'AppNextTask' => 8, 'AppDelegationUser' => 9, 'AppEnableActionUser' => 10, 'AppEnableActionDate' => 11, 'AppDisableActionUser' => 12, 'AppDisableActionDate' => 13, 'AppAutomaticDisabledDate' => 14, 'AppDelegationUserId' => 15, 'ProId' => 16, ),
|
||||
BasePeer::TYPE_COLNAME => array (AppDelayPeer::APP_DELAY_UID => 0, AppDelayPeer::PRO_UID => 1, AppDelayPeer::APP_UID => 2, AppDelayPeer::APP_NUMBER => 3, AppDelayPeer::APP_THREAD_INDEX => 4, AppDelayPeer::APP_DEL_INDEX => 5, AppDelayPeer::APP_TYPE => 6, AppDelayPeer::APP_STATUS => 7, AppDelayPeer::APP_NEXT_TASK => 8, AppDelayPeer::APP_DELEGATION_USER => 9, AppDelayPeer::APP_ENABLE_ACTION_USER => 10, AppDelayPeer::APP_ENABLE_ACTION_DATE => 11, AppDelayPeer::APP_DISABLE_ACTION_USER => 12, AppDelayPeer::APP_DISABLE_ACTION_DATE => 13, AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE => 14, AppDelayPeer::APP_DELEGATION_USER_ID => 15, AppDelayPeer::PRO_ID => 16, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_DELAY_UID' => 0, 'PRO_UID' => 1, 'APP_UID' => 2, 'APP_NUMBER' => 3, 'APP_THREAD_INDEX' => 4, 'APP_DEL_INDEX' => 5, 'APP_TYPE' => 6, 'APP_STATUS' => 7, 'APP_NEXT_TASK' => 8, 'APP_DELEGATION_USER' => 9, 'APP_ENABLE_ACTION_USER' => 10, 'APP_ENABLE_ACTION_DATE' => 11, 'APP_DISABLE_ACTION_USER' => 12, 'APP_DISABLE_ACTION_DATE' => 13, 'APP_AUTOMATIC_DISABLED_DATE' => 14, 'APP_DELEGATION_USER_ID' => 15, 'PRO_ID' => 16, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -207,6 +216,8 @@ abstract class BaseAppDelayPeer
|
||||
|
||||
$criteria->addSelectColumn(AppDelayPeer::APP_UID);
|
||||
|
||||
$criteria->addSelectColumn(AppDelayPeer::APP_NUMBER);
|
||||
|
||||
$criteria->addSelectColumn(AppDelayPeer::APP_THREAD_INDEX);
|
||||
|
||||
$criteria->addSelectColumn(AppDelayPeer::APP_DEL_INDEX);
|
||||
@@ -229,6 +240,10 @@ abstract class BaseAppDelayPeer
|
||||
|
||||
$criteria->addSelectColumn(AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE);
|
||||
|
||||
$criteria->addSelectColumn(AppDelayPeer::APP_DELEGATION_USER_ID);
|
||||
|
||||
$criteria->addSelectColumn(AppDelayPeer::PRO_ID);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(APP_DELAY.APP_DELAY_UID)';
|
||||
|
||||
Reference in New Issue
Block a user