Merge remote-tracking branch 'origin/release/3.2.1' into bugfix/HOR-3177
This commit is contained in:
@@ -283,6 +283,8 @@ class RBAC
|
||||
"PER_NAME" => "Edit User profile Default Cases Menu Options"
|
||||
), array("PER_UID" => "00000000000000000000000000000064", "PER_CODE" => "PM_REASSIGNCASE_SUPERVISOR",
|
||||
"PER_NAME" => "Reassign case supervisor"
|
||||
), array("PER_UID" => "00000000000000000000000000000065", "PER_CODE" => "PM_SETUP_CUSTOM_CASES_LIST",
|
||||
"PER_NAME" => "Setup Custom Cases List"
|
||||
)
|
||||
);
|
||||
return $permissionsAdmin;
|
||||
|
||||
@@ -62,7 +62,8 @@ INSERT INTO `RBAC_PERMISSIONS` VALUES
|
||||
('00000000000000000000000000000061','PM_EDIT_USER_PROFILE_PHOTO','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000062','PM_EDIT_USER_PROFILE_DEFAULT_MAIN_MENU_OPTIONS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000063','PM_EDIT_USER_PROFILE_DEFAULT_CASES_MENU_OPTIONS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000064','PM_REASSIGNCASE_SUPERVISOR','2016-09-01 00:00:00','2016-09-01 00:00:00',1,'00000000000000000000000000000002');
|
||||
('00000000000000000000000000000064','PM_REASSIGNCASE_SUPERVISOR','2016-09-01 00:00:00','2016-09-01 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000065','PM_SETUP_CUSTOM_CASES_LIST','2017-03-27 00:00:00','2017-03-27 00:00:00',1,'00000000000000000000000000000002');
|
||||
|
||||
INSERT INTO `RBAC_ROLES` VALUES
|
||||
('00000000000000000000000000000001','','00000000000000000000000000000001','RBAC_ADMIN','2007-07-31 19:10:22','2007-08-03 12:24:36',1),
|
||||
@@ -136,6 +137,7 @@ INSERT INTO `RBAC_ROLES_PERMISSIONS` VALUES
|
||||
('00000000000000000000000000000002','00000000000000000000000000000062'),
|
||||
('00000000000000000000000000000002','00000000000000000000000000000063'),
|
||||
('00000000000000000000000000000002','00000000000000000000000000000064'),
|
||||
('00000000000000000000000000000002','00000000000000000000000000000065'),
|
||||
('00000000000000000000000000000003','00000000000000000000000000000001'),
|
||||
('00000000000000000000000000000003','00000000000000000000000000000005'),
|
||||
('00000000000000000000000000000003','00000000000000000000000000000040'),
|
||||
|
||||
@@ -2299,9 +2299,7 @@ class Cases
|
||||
G::LoadClass('pmScript');
|
||||
$oPMScript = new PMScript();
|
||||
$oApplication = new Application();
|
||||
//$aFields = $oApplication->load($sAppUid);
|
||||
$oApplication = ApplicationPeer::retrieveByPk($sAppUid);
|
||||
$aFields = $oApplication->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
$aFields = $oApplication->Load($sAppUid);
|
||||
if (!is_array($aFields['APP_DATA'])) {
|
||||
$aFields['APP_DATA'] = G::array_merges(G::getSystemConstants(), unserialize($aFields['APP_DATA']));
|
||||
}
|
||||
@@ -2331,7 +2329,9 @@ class Cases
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
$iLastStep = intval($row[0]);
|
||||
|
||||
if ($iPosition != 10000 && $iPosition > $iLastStep) {
|
||||
throw (new Exception(G::LoadTranslation('ID_STEP_DOES_NOT_EXIST', array(G::LoadTranslation('ID_POSITION'), $iPosition))));
|
||||
}
|
||||
$iPosition += 1;
|
||||
$aNextStep = null;
|
||||
if ($iPosition <= $iLastStep) {
|
||||
|
||||
@@ -1016,8 +1016,8 @@ class Derivation
|
||||
$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, $nextDel['ROU_PREVIOUS_TASK']);
|
||||
$criteria->add(RoutePeer::ROU_TYPE, $nextDel['ROU_PREVIOUS_TYPE']);
|
||||
$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);
|
||||
|
||||
@@ -1722,6 +1722,9 @@ function PMFAddInputDocument(
|
||||
* @label PMF Generate Output Document
|
||||
*
|
||||
* @param string(32) | $outputID | Output ID | Output Document ID
|
||||
* @param string(32) | $sApplication = null | Case ID | The unique ID for a case
|
||||
* @param string(32) | $index = null | Index | Value for Index
|
||||
* @param string(32) | $sUserLogged = null | User UID | User Logged UID
|
||||
* @return none | $none | None | None
|
||||
*
|
||||
*/
|
||||
@@ -2540,7 +2543,7 @@ function PMFRedirectToStep ($sApplicationUID, $iDelegation, $sStepType, $sStepUi
|
||||
* @return array | $array | List of users | Return a list of users
|
||||
*
|
||||
*/
|
||||
function PMFGetNextAssignedUser ($application, $task, $delIndex = null, $userUid = null)
|
||||
function PMFGetNextAssignedUser($application, $task, $delIndex = null, $userUid = null)
|
||||
{
|
||||
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
@@ -2551,33 +2554,34 @@ function PMFGetNextAssignedUser ($application, $task, $delIndex = null, $userUid
|
||||
require_once 'classes/model/GroupUser.php';
|
||||
|
||||
$oTask = new Task();
|
||||
$TaskFields = $oTask->load( $task );
|
||||
$TaskFields = $oTask->load($task);
|
||||
$typeTask = $TaskFields['TAS_ASSIGN_TYPE'];
|
||||
|
||||
$g = new G();
|
||||
|
||||
$g->sessionVarSave();
|
||||
|
||||
$_SESSION['INDEX'] = (!is_null($delIndex) ? $delIndex : (isset($_SESSION['INDEX']) ? $_SESSION['INDEX'] : null));
|
||||
$_SESSION['USER_LOGGED'] = (!is_null($userUid) ? $userUid : (isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : null));
|
||||
$_SESSION['INDEX'] = (!empty($delIndex) ? $delIndex : (isset($_SESSION['INDEX']) ? $_SESSION['INDEX'] : null));
|
||||
$_SESSION['USER_LOGGED'] = (!empty($userUid) ? $userUid : (isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED']
|
||||
: null));
|
||||
|
||||
if ($typeTask == 'BALANCED' && !is_null($_SESSION['INDEX']) && !is_null($_SESSION['USER_LOGGED'])) {
|
||||
|
||||
G::LoadClass( 'derivation' );
|
||||
G::LoadClass('derivation');
|
||||
$oDerivation = new Derivation();
|
||||
$aDeriv = $oDerivation->prepareInformation( array ('USER_UID' => $_SESSION['USER_LOGGED'],'APP_UID' => $application,'DEL_INDEX' => $_SESSION['INDEX']
|
||||
) );
|
||||
$aDeriv = $oDerivation->prepareInformation(array('USER_UID' => $_SESSION['USER_LOGGED'], 'APP_UID' => $application, 'DEL_INDEX' => $_SESSION['INDEX']
|
||||
));
|
||||
|
||||
foreach ($aDeriv as $derivation) {
|
||||
|
||||
$aUser = array ('USR_UID' => $derivation['NEXT_TASK']['USER_ASSIGNED']['USR_UID'],'USR_USERNAME' => $derivation['NEXT_TASK']['USER_ASSIGNED']['USR_USERNAME'],'USR_FIRSTNAME' => $derivation['NEXT_TASK']['USER_ASSIGNED']['USR_FIRSTNAME'],'USR_LASTNAME' => $derivation['NEXT_TASK']['USER_ASSIGNED']['USR_LASTNAME'],'USR_EMAIL' => $derivation['NEXT_TASK']['USER_ASSIGNED']['USR_EMAIL']
|
||||
$aUser = array('USR_UID' => $derivation['NEXT_TASK']['USER_ASSIGNED']['USR_UID'], 'USR_USERNAME' => $derivation['NEXT_TASK']['USER_ASSIGNED']['USR_USERNAME'], 'USR_FIRSTNAME' => $derivation['NEXT_TASK']['USER_ASSIGNED']['USR_FIRSTNAME'], 'USR_LASTNAME' => $derivation['NEXT_TASK']['USER_ASSIGNED']['USR_LASTNAME'], 'USR_EMAIL' => $derivation['NEXT_TASK']['USER_ASSIGNED']['USR_EMAIL']
|
||||
);
|
||||
$aUsers[] = $aUser;
|
||||
}
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
if (count( $aUsers ) == 1) {
|
||||
if (count($aUsers) == 1) {
|
||||
return $aUser;
|
||||
} else {
|
||||
return $aUsers;
|
||||
@@ -3279,10 +3283,10 @@ function PMFGetDynaformUID($dynaFormName, $processUid = null)
|
||||
return false;
|
||||
}
|
||||
|
||||
$arrayResult = PMFGetUidFromText($dynaFormName, 'DYN_TITLE', (!is_null($processUid))? $processUid : $_SESSION['PROCESS']);
|
||||
$arrayResult = PMFGetUidFromText($dynaFormName, 'DYN_TITLE', (!empty($processUid)) ? $processUid : $_SESSION['PROCESS']);
|
||||
|
||||
//Return
|
||||
return (!empty($arrayResult))? array_shift($arrayResult) : false;
|
||||
return (!empty($arrayResult)) ? array_shift($arrayResult) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3347,7 +3351,8 @@ function PMFGetTaskUID($taskName, $processUid = null)
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_UID);
|
||||
$criteria->add(TaskPeer::TAS_TITLE, $taskName, Criteria::EQUAL);
|
||||
|
||||
$criteria->add(TaskPeer::PRO_UID, (!is_null($processUid))? $processUid : $_SESSION['PROCESS'], Criteria::EQUAL);
|
||||
$criteria->add(TaskPeer::PRO_UID, (!empty($processUid)) ? $processUid : $_SESSION['PROCESS'],
|
||||
Criteria::EQUAL);
|
||||
|
||||
$rsCriteria = TaskPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
@@ -3359,7 +3364,7 @@ function PMFGetTaskUID($taskName, $processUid = null)
|
||||
}
|
||||
|
||||
//Return
|
||||
return ($taskUid != '')? $taskUid : false;
|
||||
return ($taskUid != '') ? $taskUid : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3501,15 +3506,14 @@ function PMFCaseLink($caseUid, $workspace = null, $language = null, $skin = null
|
||||
if ($arrayApplicationData === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$workspace = (!is_null($workspace))? $workspace : SYS_SYS;
|
||||
$language = (!is_null($language))? $language : SYS_LANG;
|
||||
$skin = (!is_null($skin))? $skin : SYS_SKIN;
|
||||
$workspace = (!empty($workspace)) ? $workspace : SYS_SYS;
|
||||
$language = (!empty($language)) ? $language : SYS_LANG;
|
||||
$skin = (!empty($skin)) ? $skin : SYS_SKIN;
|
||||
|
||||
$uri = '/sys' . $workspace . '/' . $language . '/' . $skin . '/cases/opencase/' . $caseUid;
|
||||
|
||||
//Return
|
||||
return ((G::is_https())? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $uri;
|
||||
return ((G::is_https()) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $uri;
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
@@ -3707,7 +3711,7 @@ function PMFCopyDocumentCase($appDocUid, $versionNumber, $targetCaseUid, $inputD
|
||||
"APP_UID" => $targetCaseUid,
|
||||
"DEL_INDEX" => $dataFields['DEL_INDEX'],
|
||||
"USR_UID" => $dataFields['USR_UID'],
|
||||
"DOC_UID" => ($inputDocumentUid != null) ? $inputDocumentUid : $dataFields['DOC_UID'],
|
||||
"DOC_UID" => (!empty($inputDocumentUid)) ? $inputDocumentUid : $dataFields['DOC_UID'],
|
||||
"APP_DOC_TYPE" => $dataFields['APP_DOC_TYPE'],
|
||||
"APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"),
|
||||
"APP_DOC_COMMENT" => $dataFields['APP_DOC_COMMENT'],
|
||||
|
||||
@@ -2916,13 +2916,15 @@ class processMap
|
||||
if ($archivo != '..') {
|
||||
$one = 0;
|
||||
$two = 0;
|
||||
$three = 0;
|
||||
|
||||
$alink = $link . $archivo;
|
||||
|
||||
$one = count(explode('wsClient.php', $archivo));
|
||||
$two = count(explode('Post.php', $archivo));
|
||||
$three = count(explode('Info.php', $archivo));
|
||||
|
||||
if ($one == 1 && $two == 1) {
|
||||
if ($one == 1 && $two == 1 && $three == 1) {
|
||||
$arlink = "<a href='" . $alink . "' target='blank'><font color='#9999CC'>" . $alink . "</font></a>";
|
||||
$linkdelete = sprintf("<a href='javascript:webEntry_delete(\"%s\",\"%s\",\"%s\");'><font color='red'>delete</font></a>", $alink, $archivo, $sProcessUID);
|
||||
$row[] = array('W_LINK' => $arlink, 'W_FILENAME' => $archivo, 'W_PRO_UID' => $sProcessUID );
|
||||
|
||||
@@ -86,8 +86,8 @@ class spoolRun
|
||||
$this->ExceptionCode['WARNING'] = 2;
|
||||
$this->ExceptionCode['NOTICE'] = 3;
|
||||
|
||||
$this->longMailEreg = "/(.*)(<([\w\-\.']+@[\w\-_\.]+\.\w{2,5})+>)/";
|
||||
$this->mailEreg = "/^([\w\-_\.']+@[\w\-_\.]+\.\w{2,5}+)$/";
|
||||
$this->longMailEreg = "/(.*)(<([\w\-\+\.']+@[\w\-_\.]+\.\w{2,5})+>)/";
|
||||
$this->mailEreg = "/^([\w\-_\+\.']+@[\w\-_\.]+\.\w{2,5}+)$/";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -189,9 +189,6 @@ class Application extends BaseApplication
|
||||
|
||||
try {
|
||||
$oApplication = ApplicationPeer::retrieveByPK( $AppUid );
|
||||
if (!$oApplication) {
|
||||
return false;
|
||||
}
|
||||
if (is_object($oApplication) && get_class ($oApplication) == 'Application' ) {
|
||||
$aFields = $oApplication->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
$this->fromArray($aFields, BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
@@ -2113,6 +2113,24 @@ msgstr "This case does not exist"
|
||||
msgid "Application ID or Delegation Index is missing!. The System can not open the case."
|
||||
msgstr "Application ID or Delegation Index is missing!. The System can not open the case."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MEMORY_LIMIT_VALIDATE
|
||||
#: LABEL/ID_MEMORY_LIMIT_VALIDATE
|
||||
msgid "Memory Limit value has to be either a positive integer or -1."
|
||||
msgstr "Memory Limit value has to be either a positive integer or -1."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_LIFETIME_VALIDATE
|
||||
#: LABEL/ID_LIFETIME_VALIDATE
|
||||
msgid "Max Lifetime value has to be a positive integer."
|
||||
msgstr "Max Lifetime value has to be a positive integer."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_DEFAULT_EXPIRATION_YEAR_VALIDATE
|
||||
#: LABEL/ID_DEFAULT_EXPIRATION_YEAR_VALIDATE
|
||||
msgid "Default Expiration Year value has to be a positive integer."
|
||||
msgstr "Default Expiration Year value has to be a positive integer."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_PLEASE_SELECT_UPGRADE_FILE
|
||||
#: LABEL/ID_PLEASE_SELECT_UPGRADE_FILE
|
||||
|
||||
@@ -27,28 +27,18 @@ class adminProxy extends HttpProxyController
|
||||
{
|
||||
const hashunlink = 'unlink';
|
||||
|
||||
/**
|
||||
* Save configurations of systemConf
|
||||
* @param $httpData
|
||||
* @throws Exception
|
||||
*/
|
||||
public function saveSystemConf($httpData)
|
||||
{
|
||||
G::loadClass('system');
|
||||
$envFile = PATH_CONFIG . 'env.ini';
|
||||
$updateRedirector = false;
|
||||
$restart = false;
|
||||
|
||||
if (!file_exists($envFile) ) {
|
||||
if (!is_writable(PATH_CONFIG)) {
|
||||
throw new Exception('The enviroment config directory is not writable. <br/>Please give write permission to directory: /workflow/engine/config');
|
||||
}
|
||||
$content = ";\r\n";
|
||||
$content .= "; ProcessMaker System Bootstrap Configuration\r\n";
|
||||
$content .= ";\r\n";
|
||||
file_put_contents($envFile, $content);
|
||||
//@chmod($envFile, 0777);
|
||||
} else {
|
||||
if (!is_writable($envFile)) {
|
||||
throw new Exception('The enviroment ini file file is not writable. <br/>Please give write permission to file: /workflow/engine/config/env.ini');
|
||||
}
|
||||
}
|
||||
|
||||
self::validateDataSystemConf($httpData, $envFile);
|
||||
$sysConf = System::getSystemConfiguration($envFile);
|
||||
$updatedConf = array();
|
||||
|
||||
@@ -1536,5 +1526,46 @@ class adminProxy extends HttpProxyController
|
||||
G::streamFile($support, true);
|
||||
G::rm_dir($support);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate data before saving
|
||||
* @param $httpData
|
||||
* @param $envFile
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function validateDataSystemConf($httpData, $envFile)
|
||||
{
|
||||
if (!((is_numeric($httpData->memory_limit)) && ((int)$httpData->memory_limit == $httpData->memory_limit) &&
|
||||
((int)$httpData->memory_limit >= -1))
|
||||
) {
|
||||
throw new Exception(G::LoadTranslation('ID_MEMORY_LIMIT_VALIDATE'));
|
||||
}
|
||||
|
||||
if (!((is_numeric($httpData->max_life_time)) && ((int)$httpData->max_life_time == $httpData->max_life_time) &&
|
||||
((int)$httpData->max_life_time > 0))
|
||||
) {
|
||||
throw new Exception(G::LoadTranslation('ID_LIFETIME_VALIDATE'));
|
||||
}
|
||||
|
||||
if (!((is_numeric($httpData->expiration_year)) && ((int)$httpData->expiration_year == $httpData->expiration_year) &&
|
||||
((int)$httpData->expiration_year > 0))
|
||||
) {
|
||||
throw new Exception(G::LoadTranslation('ID_DEFAULT_EXPIRATION_YEAR_VALIDATE'));
|
||||
}
|
||||
|
||||
if (!file_exists($envFile)) {
|
||||
if (!is_writable(PATH_CONFIG)) {
|
||||
throw new Exception('The enviroment config directory is not writable. <br/>Please give write permission to directory: /workflow/engine/config');
|
||||
}
|
||||
$content = ";\r\n";
|
||||
$content .= "; ProcessMaker System Bootstrap Configuration\r\n";
|
||||
$content .= ";\r\n";
|
||||
file_put_contents($envFile, $content);
|
||||
//@chmod($envFile, 0777);
|
||||
} else {
|
||||
if (!is_writable($envFile)) {
|
||||
throw new Exception('The enviroment ini file is not writable. <br/>Please give write permission to file: /workflow/engine/config/env.ini');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,8 @@ INSERT INTO CONTENT (CON_CATEGORY,CON_PARENT,CON_ID,CON_LANG,CON_VALUE) VALUES
|
||||
('PER_NAME','','00000000000000000000000000000061','en','Edit User profile Photo'),
|
||||
('PER_NAME','','00000000000000000000000000000062','en','Edit User profile Default Main Menu Options'),
|
||||
('PER_NAME','','00000000000000000000000000000063','en','Edit User profile Default Cases Menu Options'),
|
||||
('PER_NAME','','00000000000000000000000000000064','en','Reassign case supervisor');
|
||||
('PER_NAME','','00000000000000000000000000000064','en','Reassign case supervisor'),
|
||||
('PER_NAME','','00000000000000000000000000000065','en','Setup Custom Cases List');
|
||||
|
||||
INSERT INTO LANGUAGE (LAN_ID,LAN_LOCATION,LAN_NAME,LAN_NATIVE_NAME,LAN_DIRECTION,LAN_WEIGHT,LAN_ENABLED,LAN_CALENDAR) VALUES
|
||||
('aa','','Afar','','L','0','0','GREGORIAN'),
|
||||
@@ -1793,6 +1794,9 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_IN','en','in','2014-01-15') ,
|
||||
( 'LABEL','ID_CASE_DOES_NOT_EXISTS','en','This case does not exist','2014-01-15') ,
|
||||
( 'LABEL','ID_APPLICATION_OR_INDEX_MISSING','en','Application ID or Delegation Index is missing!. The System can not open the case.','2017-03-30') ,
|
||||
( 'LABEL','ID_MEMORY_LIMIT_VALIDATE','en','Memory Limit value has to be either a positive integer or -1','2017-04-05') ,
|
||||
( 'LABEL','ID_LIFETIME_VALIDATE','en','Max Lifetime value has to be a positive integer','2017-04-05') ,
|
||||
( 'LABEL','ID_DEFAULT_EXPIRATION_YEAR_VALIDATE','en','Default Expiration Year value has to be a positive integer','2017-04-05') ,
|
||||
( 'LABEL','ID_PLEASE_SELECT_UPGRADE_FILE','en','Please select the upgrade file','2014-01-15') ,
|
||||
( 'LABEL','ID_PLEASE_SELECT_MAX_X_FIELDS','en','Please select 80 fields at most','2014-01-15') ,
|
||||
( 'LABEL','ID_UPGRADE_READY','en','System upgraded from revision','2014-01-15') ,
|
||||
|
||||
@@ -63,16 +63,6 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP_LANGUAGE') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'LANGUAGES', 'languages',
|
||||
G::LoadTranslation('ID_LANGUAGES'),
|
||||
'icon-language.png','', 'settings'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP_SKIN') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
@@ -103,14 +93,6 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'APPCACHEVIEW_SETUP', '../setup/appCacheViewConf',
|
||||
G::LoadTranslation('ID_APPCACHE_SETUP'),
|
||||
"", '', 'settings'
|
||||
);
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP_CLEAR_CACHE') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
@@ -159,6 +141,20 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
}
|
||||
//tools options
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP_LANGUAGE') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'LANGUAGES', 'languages',
|
||||
G::LoadTranslation('ID_LANGUAGES'),
|
||||
'icon-language.png','', 'settings'
|
||||
);
|
||||
}
|
||||
if ($RBAC->userCanAccess('PM_SETUP_CASES_LIST_CACHE_BUILDER') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'APPCACHEVIEW_SETUP', '../setup/appCacheViewConf',
|
||||
G::LoadTranslation('ID_APPCACHE_SETUP'),
|
||||
"", '', 'settings'
|
||||
);
|
||||
}
|
||||
if (!$partnerFlag) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP_PLUGINS') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
@@ -277,12 +273,12 @@ if ($licenseStatusInfo["message"] != "") {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($RBAC->userCanAccess('PM_SETUP_CASES_LIST_CACHE_BUILDER') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PMENTERPRISE', '../enterprise/addonsStore',
|
||||
G::LoadTranslation('ID_MENU_NAME') .$licStatusMsg,
|
||||
'', '', 'plugins'
|
||||
);
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PMENTERPRISE', '../enterprise/addonsStore',
|
||||
G::LoadTranslation('ID_MENU_NAME') . $licStatusMsg,
|
||||
'', '', 'plugins'
|
||||
);
|
||||
if ($RBAC->userCanAccess('PM_SETUP_CUSTOM_CASES_LIST') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'CASES_LIST_SETUP', '../cases/casesListSetup',
|
||||
G::LoadTranslation('ID_CUSTOM_CASES_LISTS'),
|
||||
|
||||
@@ -278,6 +278,7 @@ try {
|
||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
||||
$aPreviousStep = $oCase->getPreviousStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
//Obtain previous and next step - End
|
||||
|
||||
|
||||
@@ -60,6 +60,10 @@ try {
|
||||
$sContent .= "\$G_PUBLISH->AddContent('dynaform', 'xmlform', '" . $sPRO_UID . '/' . $sDYNAFORM . "', '', array(), '" . $dynTitle . 'Post.php' . "');\n";
|
||||
$sContent .= "G::RenderPage('publish', 'blank');";
|
||||
file_put_contents( $pathProcess . $dynTitle . '.php', $sContent );
|
||||
|
||||
//Create file to display information and prevent resubmission data (Post/Redirect/Get).
|
||||
\ProcessMaker\BusinessModel\WebEntry::createFileInfo($pathProcess . $dynTitle . "Info.php");
|
||||
|
||||
//creating the second file, the post file who receive the post form.
|
||||
$pluginTpl = PATH_CORE . 'templates' . PATH_SEP . 'processes' . PATH_SEP . 'webentryPost.tpl';
|
||||
$template = new TemplatePower( $pluginTpl );
|
||||
@@ -72,6 +76,7 @@ try {
|
||||
$template->assign( 'wsUser', $sWS_USER );
|
||||
$template->assign( 'wsPass', Bootstrap::hashPassword($sWS_PASS, '', true) );
|
||||
$template->assign( 'wsRoundRobin', $sWS_ROUNDROBIN );
|
||||
$template->assign( 'weTitle', $dynTitle);
|
||||
|
||||
G::auditLog('WebEntry','Generate web entry with web services ('.$dynTitle.'.php) in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
|
||||
|
||||
@@ -165,16 +165,6 @@ switch ($request) {
|
||||
} else {
|
||||
$result->info[] = array('name' => 'Error', 'value' => $res['msg']);
|
||||
}
|
||||
|
||||
$res = $appCache->setSuperForUser($currentUser);
|
||||
if (!isset($res['error'])) {
|
||||
$result->info[] = array('name' => G::LoadTranslation('ID_SETTING_SUPER'), 'value' => G::LoadTranslation('ID_SUCCESSFULLY'));
|
||||
} else {
|
||||
$result->error = true;
|
||||
$result->errorMsg = $res['msg'];
|
||||
}
|
||||
$currentUserIsSuper = true;
|
||||
|
||||
}
|
||||
|
||||
//now check if table APPCACHEVIEW exists, and it have correct number of fields, etc.
|
||||
|
||||
@@ -1140,6 +1140,7 @@ class User
|
||||
* @param bool $flagRecord Flag that set the "getting" of record
|
||||
* @param bool $throwException Flag to throw the exception (This only if the parameters are invalid)
|
||||
* (TRUE: throw the exception; FALSE: returns FALSE)
|
||||
* @param string $status The user's status, which can be "ACTIVE", "INACTIVE" or "VACATION"
|
||||
*
|
||||
* @return array Return an array with all Users, ThrowTheException/FALSE otherwise
|
||||
*/
|
||||
@@ -1150,7 +1151,8 @@ class User
|
||||
$start = null,
|
||||
$limit = null,
|
||||
$flagRecord = true,
|
||||
$throwException = true
|
||||
$throwException = true,
|
||||
$status = null
|
||||
) {
|
||||
try {
|
||||
$arrayUser = array();
|
||||
@@ -1210,7 +1212,9 @@ class User
|
||||
$criteria->add($value[0], $value[1], $value[2]);
|
||||
}
|
||||
} else {
|
||||
$criteria->add(\UsersPeer::USR_STATUS, 'ACTIVE', \Criteria::EQUAL);
|
||||
if (!is_null($status)) {
|
||||
$criteria->add(\UsersPeer::USR_STATUS, strtoupper($status), \Criteria::EQUAL);
|
||||
}
|
||||
}
|
||||
|
||||
if ($flagFilter && trim($arrayWhere['filter']) != '') {
|
||||
|
||||
@@ -398,10 +398,10 @@ class WebEntry
|
||||
$weTitle = $this->sanitizeFilename($arrayWebEntryData["WE_TITLE"]);
|
||||
$fileName = $weTitle;
|
||||
|
||||
$fileContent = "<?php\n";
|
||||
$fileContent = "<?php\n\n";
|
||||
$fileContent .= "global \$_DBArray;\n";
|
||||
$fileContent .= "if (!isset(\$_DBArray)) {\n";
|
||||
$fileContent .= " \$_DBArray = array();\n";
|
||||
$fileContent .= " \$_DBArray = array();\n";
|
||||
$fileContent .= "}\n";
|
||||
$fileContent .= "\$_SESSION[\"PROCESS\"] = \"" . $processUid . "\";\n";
|
||||
$fileContent .= "\$_SESSION[\"CURRENT_DYN_UID\"] = \"" . $dynaFormUid . "\";\n";
|
||||
@@ -409,15 +409,18 @@ class WebEntry
|
||||
|
||||
$fileContent .= "G::LoadClass(\"pmDynaform\");\n";
|
||||
$fileContent .= "\$a = new pmDynaform(array(\"CURRENT_DYNAFORM\" => \"" . $arrayWebEntryData["DYN_UID"] . "\"));\n";
|
||||
$fileContent .= "if (\$a->isResponsive()) {";
|
||||
$fileContent .= " \$a->printWebEntry(\"" . $fileName . "Post.php\");";
|
||||
$fileContent .= "} else {";
|
||||
$fileContent .= " \$G_PUBLISH->AddContent(\"dynaform\", \"xmlform\", \"" . $processUid . PATH_SEP . $dynaFormUid . "\", \"\", array(), \"" . $fileName . "Post.php\");\n";
|
||||
$fileContent .= " G::RenderPage(\"publish\", \"blank\");";
|
||||
$fileContent .= "}";
|
||||
$fileContent .= "if (\$a->isResponsive()) {\n";
|
||||
$fileContent .= " \$a->printWebEntry(\"" . $fileName . "Post.php\");\n";
|
||||
$fileContent .= "} else {\n";
|
||||
$fileContent .= " \$G_PUBLISH->AddContent(\"dynaform\", \"xmlform\", \"" . $processUid . PATH_SEP . $dynaFormUid . "\", \"\", array(), \"" . $fileName . "Post.php\");\n";
|
||||
$fileContent .= " G::RenderPage(\"publish\", \"blank\");\n";
|
||||
$fileContent .= "}\n";
|
||||
|
||||
file_put_contents($pathDataPublicProcess . PATH_SEP . $fileName . ".php", $fileContent);
|
||||
|
||||
//Create file to display information and prevent resubmission data (Post/Redirect/Get).
|
||||
self::createFileInfo($pathDataPublicProcess . PATH_SEP . $weTitle . "Info.php");
|
||||
|
||||
//Creating the second file, the post file who receive the post form.
|
||||
$pluginTpl = PATH_TPL . "processes" . PATH_SEP . "webentryPost.tpl";
|
||||
|
||||
@@ -432,6 +435,7 @@ class WebEntry
|
||||
$template->assign("wsUser", $usrUsername);
|
||||
$template->assign("wsPass", \Bootstrap::getPasswordHashType() . ':' . $usrPassword);
|
||||
$template->assign("wsRoundRobin", $wsRoundRobin);
|
||||
$template->assign("weTitle", $weTitle);
|
||||
|
||||
if ($webEntryInputDocumentAccess == 0) {
|
||||
//Restricted to process permissions
|
||||
@@ -1033,5 +1037,30 @@ class WebEntry
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create file to display information and prevent resubmission data (Post/Redirect/Get).
|
||||
* @param string $pathFileName
|
||||
*/
|
||||
public static function createFileInfo($pathFileName)
|
||||
{
|
||||
$code = ""
|
||||
. "<?php\n"
|
||||
. "\n"
|
||||
. "\$G_PUBLISH = new Publisher();\n"
|
||||
. "\$show = \"login/showMessage\";\n"
|
||||
. "\$message = \"\";\n"
|
||||
. "if (isset(\$_SESSION[\"__webEntrySuccess__\"])) {\n"
|
||||
. " \$show = \"login/showInfo\";\n"
|
||||
. " \$message = \$_SESSION[\"__webEntrySuccess__\"];\n"
|
||||
. "} else {\n"
|
||||
. " \$show = \"login/showMessage\";\n"
|
||||
. " \$message = \$_SESSION[\"__webEntryError__\"];\n"
|
||||
. "}\n"
|
||||
. "\$G_PUBLISH->AddContent(\"xmlform\", \"xmlform\", \$show, \"\", \$message);\n"
|
||||
. "G::RenderPage(\"publish\", \"blank\");\n"
|
||||
. "\n";
|
||||
file_put_contents($pathFileName, $code);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ class ActivityPropertiesStructure
|
||||
public $tas_calendar;
|
||||
|
||||
/**
|
||||
* @var string {@from body} {@choice NORMAL,ADHOC}
|
||||
* @var string {@from body} {@choice NORMAL,ADHOC,SUBPROCESS}
|
||||
*/
|
||||
public $tas_type;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class User extends Api
|
||||
* @class AccessControl {@permission PM_USERS,PM_FACTORY}
|
||||
* @url GET
|
||||
*/
|
||||
public function index($filter = null, $lfilter = null, $rfilter = null, $start = null, $limit = null)
|
||||
public function index($filter = null, $lfilter = null, $rfilter = null, $start = null, $limit = null, $status = null)
|
||||
{
|
||||
try {
|
||||
$user = new \ProcessMaker\BusinessModel\User();
|
||||
@@ -32,7 +32,7 @@ class User extends Api
|
||||
"filterOption" => (!is_null($filter))? "" : ((!is_null($lfilter))? "LEFT" : ((!is_null($rfilter))? "RIGHT" : ""))
|
||||
);
|
||||
|
||||
$response = $user->getUsers($arrayFilterData, null, null, $start, $limit, false);
|
||||
$response = $user->getUsers($arrayFilterData, null, null, $start, $limit, false, true, $status);
|
||||
|
||||
return \ProcessMaker\Util\DateTime::convertUtcToIso8601($response['data'], $this->arrayFieldIso8601);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -85,32 +85,6 @@ Ext.onReady(function(){
|
||||
|
||||
cmbTimeZone.setValue(sysConf.time_zone);
|
||||
|
||||
txtExpirationYear = new Ext.form.TextField({
|
||||
xtype: 'numberfield',
|
||||
id : 'expiration_year',
|
||||
name : 'expiration_year',
|
||||
fieldLabel: _('ID_DEFAULT_EXPIRATION_YEAR'),
|
||||
allowBlank: false,
|
||||
allowNegative: false,
|
||||
value: 1,
|
||||
maxlength: 15,
|
||||
minValue: 1,
|
||||
validator: function(value){
|
||||
if(value > 0) {
|
||||
return true;
|
||||
} else {
|
||||
PMExt.error( _('ID_ERROR'), _('ID_INVALID_VALUE_EXPECTING_POSITIVE_INTEGER', _('ID_DEFAULT_EXPIRATION_YEAR')));
|
||||
return false;
|
||||
}
|
||||
},
|
||||
listeners:{
|
||||
change: function(){
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
});
|
||||
txtExpirationYear.setValue(sysConf.expiration_year);
|
||||
|
||||
saveButton = new Ext.Action({
|
||||
text : _('ID_SAVE_SETTINGS'),
|
||||
disabled : true,
|
||||
@@ -118,38 +92,56 @@ Ext.onReady(function(){
|
||||
});
|
||||
|
||||
xfieldsUp = new Ext.form.FieldSet({
|
||||
title: _('ID_SYSTEM_SETTINGS'),
|
||||
items : [
|
||||
cmbTimeZone,
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
id : 'memory_limit',
|
||||
name : 'memory_limit',
|
||||
fieldLabel: _('ID_MEMORY_LIMIT'),
|
||||
allowBlank: false,
|
||||
autoCreate: {tag: "input", type: "text", autocomplete: "off", maxlength: 15 },
|
||||
value: sysConf.memory_limit,
|
||||
listeners:{
|
||||
change: function(){
|
||||
changeSettings();
|
||||
title: _('ID_SYSTEM_SETTINGS'),
|
||||
items: [
|
||||
cmbTimeZone,
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
id: 'memory_limit',
|
||||
name: 'memory_limit',
|
||||
fieldLabel: _('ID_MEMORY_LIMIT'),
|
||||
allowBlank: false,
|
||||
allowDecimals: false,
|
||||
minValue: -1,
|
||||
autoCreate: {tag: "input", type: "text", autocomplete: "off", maxlength: 15},
|
||||
value: sysConf.memory_limit,
|
||||
listeners: {
|
||||
change: function () {
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
xtype: 'numberfield',
|
||||
id: 'max_life_time',
|
||||
name: 'max_life_time',
|
||||
fieldLabel: _('ID_MAX_LIFETIME'),
|
||||
allowNegative: false,
|
||||
allowDecimals: false,
|
||||
autoCreate: {tag: "input", type: "text", autocomplete: "off", maxlength: 15},
|
||||
value: sysConf.session_gc_maxlifetime,
|
||||
listeners: {
|
||||
change: function () {
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
xtype: 'numberfield',
|
||||
id: 'expiration_year',
|
||||
name: 'expiration_year',
|
||||
fieldLabel: _('ID_DEFAULT_EXPIRATION_YEAR'),
|
||||
allowBlank: false,
|
||||
allowNegative: false,
|
||||
allowDecimals: false,
|
||||
value: sysConf.expiration_year,
|
||||
maxlength: 15,
|
||||
minValue: 1,
|
||||
listeners: {
|
||||
change: function () {
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
xtype: 'numberfield',
|
||||
id : 'max_life_time',
|
||||
name : 'max_life_time',
|
||||
fieldLabel: _('ID_MAX_LIFETIME'),
|
||||
// allowBlank: false,
|
||||
autoCreate: {tag: "input", type: "text", autocomplete: "off", maxlength: 15 },
|
||||
value: sysConf.session_gc_maxlifetime,
|
||||
listeners:{
|
||||
change: function(){
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
,txtExpirationYear
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
xfieldsBelow = new Ext.form.FieldSet({
|
||||
|
||||
@@ -1932,11 +1932,7 @@ Ext.onReady ( function() {
|
||||
|
||||
var toolbarUnassigned = [
|
||||
optionMenuOpen,
|
||||
btnRead,
|
||||
'-',
|
||||
btnUnread,
|
||||
'-',
|
||||
btnAll,
|
||||
'->', // begin using the right-justified button container
|
||||
_("ID_CATEGORY"),
|
||||
comboCategory,
|
||||
|
||||
@@ -193,13 +193,11 @@ try {
|
||||
exit( 0 );
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent("xmlform", "xmlform", "login/showInfo", "", $aMessage);
|
||||
G::RenderPage("publish", "blank");
|
||||
$_SESSION["__webEntrySuccess__"] = $aMessage;
|
||||
G::header("location:{weTitle}Info.php");
|
||||
} catch (Exception $e) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$suggest_message = "This web entry should be regenerated, please contact to your system administrator.";
|
||||
$aMessage["MESSAGE"] = "<font color=\"red\"><pre>" . $e->getMessage() . "</pre>" . $suggest_message . "</font>";
|
||||
$G_PUBLISH->AddContent("xmlform", "xmlform", "login/showMessage", "", $aMessage);
|
||||
G::RenderPage("publish", "blank");
|
||||
$_SESSION["__webEntryError__"] = $aMessage;
|
||||
G::header("location:{weTitle}Info.php");
|
||||
}
|
||||
|
||||
@@ -962,6 +962,7 @@ if (! defined( 'EXECUTE_BY_CRON' )) {
|
||||
$noLoginFiles[] = 'licenseUpdate';
|
||||
$noLoginFiles[] = 'casesStreamingFile';
|
||||
$noLoginFiles[] = 'opencase';
|
||||
$noLoginFiles[] = 'defaultAjaxDynaform';
|
||||
|
||||
$noLoginFolders[] = 'services';
|
||||
$noLoginFolders[] = 'tracker';
|
||||
|
||||
Reference in New Issue
Block a user