PMCORE-3869
This commit is contained in:
@@ -1185,7 +1185,7 @@ class Applications
|
||||
$outputDoc = $appDocument->getObject($appUid, $index, $caseStep->getStepUidObj(), 'OUTPUT');
|
||||
$stepItem['title'] = $oDocument->getOutDocTitle();
|
||||
|
||||
if ($outputDoc['APP_DOC_UID']) {
|
||||
if (!empty($outputDoc['APP_DOC_UID'])) {
|
||||
$stepItem['url'] = "cases/cases_Step?UID=$stepUid&TYPE=$stepType&POSITION=$stepPosition&ACTION=VIEW&DOC={$outputDoc['APP_DOC_UID']}";
|
||||
} else {
|
||||
$stepItem['url'] = "cases/cases_Step?UID=$stepUid&TYPE=$stepType&POSITION=$stepPosition&ACTION=GENERATE";
|
||||
|
||||
@@ -312,7 +312,7 @@ abstract class ArrayBasePeer
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
private function createSelectSql($criteria, $tableName, &$params)
|
||||
private static function createSelectSql($criteria, $tableName, &$params)
|
||||
{
|
||||
$db = Propel::getDB($criteria->getDbName());
|
||||
|
||||
|
||||
@@ -2558,7 +2558,7 @@ class Cases
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function getTransferHistoryCriteria($appNumber)
|
||||
public static function getTransferHistoryCriteria($appNumber)
|
||||
{
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
|
||||
@@ -465,7 +465,7 @@ class Configurations // extends Configuration
|
||||
}
|
||||
}
|
||||
|
||||
public function getDateFormats()
|
||||
public static function getDateFormats()
|
||||
{
|
||||
$arrayFormat = array();
|
||||
|
||||
@@ -491,7 +491,7 @@ class Configurations // extends Configuration
|
||||
return $arrayFormat;
|
||||
}
|
||||
|
||||
public function getUserNameFormats()
|
||||
public static function getUserNameFormats()
|
||||
{
|
||||
$formats[] = array('id' => '@firstName @lastName', //the id , don't translate
|
||||
'name' => G::loadTranslation('ID_USERNAME_FORMAT_1') //label displayed, can be translated
|
||||
|
||||
@@ -1003,7 +1003,7 @@ class AdditionalTables extends BaseAdditionalTables
|
||||
* @param array $process
|
||||
* @return array
|
||||
*/
|
||||
public function getAll($start = 0, $limit = 20, $filter = '', $process = null)
|
||||
public static function getAll($start = 0, $limit = 20, $filter = '', $process = null)
|
||||
{
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_UID);
|
||||
|
||||
@@ -566,7 +566,7 @@ class AddonsStore extends BaseAddonsStore
|
||||
|
||||
try {
|
||||
//Add each item to this stores addons
|
||||
$addons = @get_object_vars($serverData->addons);
|
||||
$addons = !is_array($serverData->addons) ? get_object_vars($serverData->addons) : $serverData->addons;
|
||||
|
||||
if (!empty($addons)) {
|
||||
foreach (get_object_vars($serverData->addons) as $addonId => $addonInfo) {
|
||||
|
||||
@@ -821,7 +821,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
return (int)$data['DEL_INDEX'];
|
||||
}
|
||||
|
||||
public function getCurrentTask($appUid)
|
||||
public static function getCurrentTask($appUid)
|
||||
{
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->addSelectColumn(AppDelegationPeer::TAS_UID);
|
||||
|
||||
@@ -134,7 +134,7 @@ class AppDocument extends BaseAppDocument
|
||||
try {
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->add( AppDocumentPeer::APP_DOC_UID, $sAppDocUid );
|
||||
if ($appUID != 0) {
|
||||
if (!empty($appUID)) {
|
||||
$oCriteria->add( AppDocumentPeer::APP_UID, $appUID );
|
||||
}
|
||||
$oCriteria->addDescendingOrderByColumn( AppDocumentPeer::DOC_VERSION );
|
||||
|
||||
@@ -34,7 +34,6 @@ class treeNode extends stdclass
|
||||
}
|
||||
|
||||
try {
|
||||
$json = new Services_JSON();
|
||||
header("Content-Type: application/json;");
|
||||
|
||||
switch ($_REQUEST["m"]) {
|
||||
@@ -51,7 +50,7 @@ try {
|
||||
$departments = $ldapAdvanced->searchDepartments();
|
||||
$terminatedOu = $ldapAdvanced->getTerminatedOu();
|
||||
$nodes = lookForChildrenDeps("");
|
||||
die($json->encode($nodes));
|
||||
die(json_encode($nodes));
|
||||
break;
|
||||
case "saveDepartments":
|
||||
$depsToCheck = ($_REQUEST['departmentsDN'] != '') ? explode('|', $_REQUEST['departmentsDN']) : [];
|
||||
@@ -87,7 +86,7 @@ try {
|
||||
[$parentDn, $departmentTitle]
|
||||
);
|
||||
|
||||
echo $json->encode($response);
|
||||
echo json_encode($response);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
@@ -106,7 +105,7 @@ try {
|
||||
$response->status = 'ERROR';
|
||||
$response->message = G::LoadTranslation('ID_DEPARTMENT_ERROR_CREATE');
|
||||
|
||||
echo $json->encode($response);
|
||||
echo json_encode($response);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
@@ -144,7 +143,7 @@ try {
|
||||
|
||||
$response = new stdclass();
|
||||
$response->status = "OK";
|
||||
die($json->encode($response));
|
||||
die(json_encode($response));
|
||||
break;
|
||||
case "loadGroups":
|
||||
global $ldapAdvanced;
|
||||
@@ -153,7 +152,7 @@ try {
|
||||
$ldapAdvanced = getLDAPAdvanceInstance($_REQUEST["authUid"]);
|
||||
$groups = $ldapAdvanced->searchGroups();
|
||||
$nodes = lookForChildrenGroups();
|
||||
die($json->encode($nodes));
|
||||
die(json_encode($nodes));
|
||||
break;
|
||||
case "saveGroups":
|
||||
$groupsToCheck = explode("|", $_REQUEST["groupsDN"]);
|
||||
@@ -216,7 +215,7 @@ try {
|
||||
if ($ldapAdvanced->checkDuplicateTitles()) {
|
||||
$response->warning = G::LoadTranslation("ID_IT_WAS_IDENTIFIED_DUPLICATED_GROUPS_PLEASE_REMOVE_THESE_GROUPS");
|
||||
}
|
||||
die($json->encode($response));
|
||||
die(json_encode($response));
|
||||
break;
|
||||
}
|
||||
} catch (Exception $error) {
|
||||
@@ -224,7 +223,7 @@ try {
|
||||
$response->status = "ERROR";
|
||||
$response->message = $error->getMessage();
|
||||
|
||||
die($json->encode($response));
|
||||
die(json_encode($response));
|
||||
}
|
||||
|
||||
function getLDAPAdvanceInstance($authUid)
|
||||
|
||||
@@ -765,6 +765,7 @@ try {
|
||||
//Take the first derivation rule as the task derivation rule type.
|
||||
$aFields['PROCESS']['ROU_TYPE'] = $aFields['TASK'][1]['ROU_TYPE'];
|
||||
$aFields['PROCESS']['ROU_FINISH_FLAG'] = false;
|
||||
$aFields['PROCESS']['ERROR'] = '';
|
||||
|
||||
foreach ($aFields['TASK'] as $sKey => &$aValues) {
|
||||
$sPriority = ''; //set priority value
|
||||
@@ -779,6 +780,8 @@ try {
|
||||
$hiddenName = "form[TASKS][" . $sKey . "][TAS_UID]";
|
||||
$hiddenField = '<input type="hidden" name="' . $hiddenName . '" id="' . $hiddenName . '" value="' . $aValues['NEXT_TASK']['TAS_UID'] . '">';
|
||||
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_HIDDEN_FIELD'] = $hiddenField;
|
||||
$aFields['TASK'][$sKey]['NEXT_TASK']['ROU_FINISH_FLAG'] = $aFields['TASK'][$sKey]['NEXT_TASK']['ROU_FINISH_FLAG'] ?? false;
|
||||
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_NEXT'] = $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_NEXT'] ?? '';
|
||||
|
||||
switch ($aValues['NEXT_TASK']['TAS_ASSIGN_TYPE']) {
|
||||
case 'EVALUATE':
|
||||
@@ -1007,6 +1010,8 @@ try {
|
||||
$aFields['TASK'][$sKey]['NEXT_TASK']['SOURCE_UID'] = '<input type="hidden" name="' . $hiddenName . '[SOURCE_UID]" id="' . $hiddenName . '[SOURCE_UID]" value="' . $aValues['SOURCE_UID'] . '">';
|
||||
}
|
||||
}
|
||||
$aFields['TASK'][$sKey]['NEXT_TASK']['ROU_PREVIOUS_TASK'] = $aFields['TASK'][$sKey]['NEXT_TASK']['ROU_PREVIOUS_TASK'] ?? '';
|
||||
$aFields['TASK'][$sKey]['NEXT_TASK']['ROU_PREVIOUS_TYPE'] = $aFields['TASK'][$sKey]['NEXT_TASK']['ROU_PREVIOUS_TYPE'] ?? '';
|
||||
}
|
||||
|
||||
$aFields['PROCESSING_MESSAGE'] = G::loadTranslation('ID_PROCESSING');
|
||||
|
||||
@@ -50,7 +50,7 @@ switch ($request) {
|
||||
if (isset($_POST["casesListDateFormat"])) {
|
||||
$config['casesListDateFormat'] = $_POST["casesListDateFormat"];
|
||||
}
|
||||
if (isset($_POST["casesListDateFormat"])) {
|
||||
if (isset($_POST["casesListRowNumber"])) {
|
||||
$config['casesListRowNumber'] = intval( $_POST["casesListRowNumber"] );
|
||||
}
|
||||
if (isset($_POST["txtCasesRefreshTime"])) {
|
||||
|
||||
@@ -264,8 +264,10 @@ class Task
|
||||
}
|
||||
|
||||
foreach ($arrayProperty as $k => $v) {
|
||||
if (!is_array($v)) {
|
||||
$arrayProperty[$k] = str_replace("@amp@", "&", $v);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($arrayProperty["TAS_SEND_LAST_EMAIL"])) {
|
||||
$arrayProperty["TAS_SEND_LAST_EMAIL"] = ($arrayProperty["TAS_SEND_LAST_EMAIL"] == "TRUE")? "TRUE" : "FALSE";
|
||||
|
||||
@@ -860,7 +860,7 @@ if (substr(SYS_COLLECTION, 0, 8) === 'gulliver') {
|
||||
//if the method name is empty set default to index method
|
||||
$controllerAction = SYS_TARGET != '' ? SYS_TARGET : 'index';
|
||||
//if the method exists
|
||||
if (is_callable(array(new $controllerClass, $controllerAction))) {
|
||||
if (method_exists($controllerClass, $controllerAction)) {
|
||||
$isControllerCall = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user