@@ -75,25 +75,99 @@ class G
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate Password Random
|
* Generate Password Random
|
||||||
* @access public
|
* $availableSets set next options:
|
||||||
* @param Int
|
* l: lowercase set a-z
|
||||||
* @return String
|
* u: uppercase set A-Z
|
||||||
|
* n: numbers set 0-9
|
||||||
|
* s: symbols set _-+=!@#$%*&,.;:?^()[]{}<>
|
||||||
|
*
|
||||||
|
* $symbol is source symbol generate
|
||||||
|
*
|
||||||
|
* @param int $length
|
||||||
|
* @param string $availableSets
|
||||||
|
* @param string $symbol
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generate_password($length = 8)
|
public function generate_password($length = 15, $availableSets = "luns", $symbol = "_-+=!@#$%*&,.")
|
||||||
{
|
{
|
||||||
|
$chars = "";
|
||||||
|
if (strpos($availableSets, "l") !== false) {
|
||||||
|
$chars = $chars . "abcdefghjkmnpqrstuvwxyz";
|
||||||
|
}
|
||||||
|
if (strpos($availableSets, "u") !== false) {
|
||||||
|
$chars = $chars . "ABCDEFGHJKMNPQRSTUVWXYZ";
|
||||||
|
}
|
||||||
|
if (strpos($availableSets, "n") !== false) {
|
||||||
|
$chars = $chars . "0123456789";
|
||||||
|
}
|
||||||
|
if (strpos($availableSets, "s") !== false) {
|
||||||
|
$chars = $chars . $symbol;
|
||||||
|
}
|
||||||
|
$n = strlen($chars);
|
||||||
|
do {
|
||||||
$password = "";
|
$password = "";
|
||||||
$possible = "0123456789bcdfghjkmnpqrstvwxyz";
|
$i = 0;
|
||||||
$i = 0;
|
while ($i < $length) {
|
||||||
while ($i<$length) {
|
$chars = str_shuffle($chars);
|
||||||
$char = substr($possible, mt_rand(0, strlen($possible)-1), 1);
|
$char = substr($chars, mt_rand(0, $n - 1), 1);
|
||||||
if (!strstr($password, $char)) {
|
if (!strstr($password, $char)) {
|
||||||
$password .= $char;
|
$password = $password . $char;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
$password = str_shuffle($password);
|
||||||
}
|
}
|
||||||
|
$info = G::check_password($password, $length, $length, $availableSets);
|
||||||
|
} while (!$info->isValid);
|
||||||
return $password;
|
return $password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check password strong
|
||||||
|
*
|
||||||
|
* $availableSets set next options:
|
||||||
|
* l: lowercase set a-z
|
||||||
|
* u: uppercase set A-Z
|
||||||
|
* n: numbers set 0-9
|
||||||
|
* s: symbols set _-+=!@#$%*&,.;:?^()[]{}<>
|
||||||
|
*
|
||||||
|
* @param string $password
|
||||||
|
* @param int $min
|
||||||
|
* @param int $max
|
||||||
|
* @param string $availableSets
|
||||||
|
* @return \stdClass
|
||||||
|
*/
|
||||||
|
public function check_password($password, $min = 2, $max = 20, $availableSets = "luns")
|
||||||
|
{
|
||||||
|
$info = new stdClass();
|
||||||
|
$info->isValid = true;
|
||||||
|
$info->error = "";
|
||||||
|
if (strlen($password) < $min) {
|
||||||
|
$info->error .= G::LoadTranslation("ID_PASSWORD_TOO_SHORT") . " ";
|
||||||
|
$info->isValid = false;
|
||||||
|
}
|
||||||
|
if (strlen($password) > $max) {
|
||||||
|
$info->error .= G::LoadTranslation("ID_PASSWORD_TOO_LONG") . " ";
|
||||||
|
$info->isValid = false;
|
||||||
|
}
|
||||||
|
if (strpos($availableSets, "l") !== false && !preg_match("#[a-z]+#", $password)) {
|
||||||
|
$info->error .= G::LoadTranslation("ID_PASSWORD_MUST_INCLUDE_AT_LEAST_ONE_LETTER") . " ";
|
||||||
|
$info->isValid = false;
|
||||||
|
}
|
||||||
|
if (strpos($availableSets, "u") !== false && !preg_match("#[A-Z]+#", $password)) {
|
||||||
|
$info->error .= G::LoadTranslation("ID_PASSWORD_MUST_INCLUDE_AT_LEAST_ONE_CAPS") . " ";
|
||||||
|
$info->isValid = false;
|
||||||
|
}
|
||||||
|
if (strpos($availableSets, "n") !== false && !preg_match("#[0-9]+#", $password)) {
|
||||||
|
$info->error .= G::LoadTranslation("ID_PASSWORD_MUST_INCLUDE_AT_LEAST_ONE_NUMBER") . " ";
|
||||||
|
$info->isValid = false;
|
||||||
|
}
|
||||||
|
if (strpos($availableSets, "s") !== false && !preg_match("#\W+#", $password)) {
|
||||||
|
$info->error .= G::LoadTranslation("ID_PASSWORD_MUST_INCLUDE_AT_LEAST_ONE_SYMBOL") . " ";
|
||||||
|
$info->isValid = false;
|
||||||
|
}
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array concat
|
* Array concat
|
||||||
* array_concat(ArrayToConcat,ArrayOriginal);
|
* array_concat(ArrayToConcat,ArrayOriginal);
|
||||||
|
|||||||
@@ -661,4 +661,35 @@ class InputFilter
|
|||||||
$sanitizefilteredPath = mb_ereg_replace("(^~)", '', $sanitizefilteredPath);
|
$sanitizefilteredPath = mb_ereg_replace("(^~)", '', $sanitizefilteredPath);
|
||||||
return $sanitizefilteredPath;
|
return $sanitizefilteredPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter only characters valids by regular expression
|
||||||
|
*
|
||||||
|
* @param mixed $data Data
|
||||||
|
* @param mixed $regex Regular expression
|
||||||
|
*
|
||||||
|
* @return mixed Returns data with the characters valids by regular expression
|
||||||
|
*/
|
||||||
|
function xssRegexFilter($data, $regex)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
switch (gettype($data)) {
|
||||||
|
case 'array':
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
$data[$key] = $this->xssRegexFilter($value, (is_array($regex))? ((isset($regex[$key]))? $regex[$key] : '') : $regex);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if ($regex != '') {
|
||||||
|
$data = (preg_match_all($regex, $data, $arrayMatch))? implode('', $arrayMatch[0]) : '';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Return
|
||||||
|
return $data;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class Installer
|
|||||||
*/
|
*/
|
||||||
public function create_site($config = Array(), $confirmed = false)
|
public function create_site($config = Array(), $confirmed = false)
|
||||||
{
|
{
|
||||||
$this->options = G::array_concat(Array('isset' => false, 'password' => G::generate_password(12), 'path_data' => @PATH_DATA, 'path_compiled' => @PATH_C, 'name' => $config['name'], 'database' => Array(), 'admin' => Array('username' => 'admin', 'password' => 'admin'
|
$this->options = G::array_concat(Array('isset' => false, 'password' => G::generate_password(15), 'path_data' => @PATH_DATA, 'path_compiled' => @PATH_C, 'name' => $config['name'], 'database' => Array(), 'admin' => Array('username' => 'admin', 'password' => 'admin'
|
||||||
), 'advanced' => Array('ao_db_wf' => 'wf_' . $config['name'], 'ao_db_rb' => 'rb_' . $config['name'], 'ao_db_rp' => 'rp_' . $config['name'], 'ao_db_drop' => false
|
), 'advanced' => Array('ao_db_wf' => 'wf_' . $config['name'], 'ao_db_rb' => 'rb_' . $config['name'], 'ao_db_rp' => 'rp_' . $config['name'], 'ao_db_drop' => false
|
||||||
)
|
)
|
||||||
), $config);
|
), $config);
|
||||||
|
|||||||
@@ -7234,7 +7234,7 @@ class Cases
|
|||||||
* @return array (criteria+array)
|
* @return array (criteria+array)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function getUsersParticipatedInCase($sAppUid)
|
public function getUsersParticipatedInCase($sAppUid, $usrStatus = '')
|
||||||
{
|
{
|
||||||
$c = new Criteria('workflow');
|
$c = new Criteria('workflow');
|
||||||
$c->addSelectColumn(AppDelegationPeer::APP_UID);
|
$c->addSelectColumn(AppDelegationPeer::APP_UID);
|
||||||
@@ -7242,6 +7242,10 @@ class Cases
|
|||||||
$c->addSelectColumn(UsersPeer::USR_USERNAME);
|
$c->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||||
$c->addSelectColumn(UsersPeer::USR_EMAIL);
|
$c->addSelectColumn(UsersPeer::USR_EMAIL);
|
||||||
|
|
||||||
|
if($usrStatus != '') {
|
||||||
|
$c->add(UsersPeer::USR_STATUS, $usrStatus, CRITERIA::EQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
$c->add(AppDelegationPeer::APP_UID, $sAppUid, CRITERIA::EQUAL);
|
$c->add(AppDelegationPeer::APP_UID, $sAppUid, CRITERIA::EQUAL);
|
||||||
$c->addJoin(AppDelegationPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
$c->addJoin(AppDelegationPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
||||||
$rs = AppDelegationPeer::doSelectRS($c);
|
$rs = AppDelegationPeer::doSelectRS($c);
|
||||||
|
|||||||
@@ -208,17 +208,25 @@ class Derivation
|
|||||||
$flagAddDelegation = $pmScript->evaluate();
|
$flagAddDelegation = $pmScript->evaluate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trim($arrayRouteData["ROU_CONDITION"]) == "" && $arrayRouteData["ROU_NEXT_TASK"] != "-1") {
|
//In the 3.0.1.7 version we have a condition for join and the rouCondition maybe is true, 1, etc
|
||||||
|
$rouCondition = trim($arrayRouteData["ROU_CONDITION"]);
|
||||||
|
if($rouCondition !== '' && $arrayRouteData["ROU_TYPE"] === 'SEC-JOIN'){
|
||||||
|
error_log(G::LoadTranslation( 'ID_WARNING_GATEWAY_CONVERGENT_WITH_CONDITION' ).' '.$flagAddDelegation);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($arrayRouteData["ROU_NEXT_TASK"] != "-1" && $rouCondition === '') {
|
||||||
$arrayTaskData = $task->load($arrayRouteData["ROU_NEXT_TASK"]);
|
$arrayTaskData = $task->load($arrayRouteData["ROU_NEXT_TASK"]);
|
||||||
if ($arrayRouteData["ROU_TYPE"] != "SEC-JOIN" && $arrayTaskData["TAS_TYPE"] == "GATEWAYTOGATEWAY") {
|
if ($arrayRouteData["ROU_TYPE"] != "SEC-JOIN" && $arrayTaskData["TAS_TYPE"] == "GATEWAYTOGATEWAY") {
|
||||||
$flagAddDelegation = true;
|
$flagAddDelegation = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($arrayRouteData["ROU_TYPE"] == "SEC-JOIN"){
|
//In the 3.0.1.8 version the Secjoin does not have a rouCondition
|
||||||
$aSecJoin[$count]["ROU_PREVIOUS_TASK"] = $arrayRouteData["ROU_NEXT_TASK"];
|
if($arrayRouteData["ROU_NEXT_TASK"] !== '-1' && $arrayRouteData["ROU_TYPE"] === 'SEC-JOIN'){
|
||||||
$aSecJoin[$count]["ROU_PREVIOUS_TYPE"] = "SEC-JOIN";
|
$arrayTaskData = $task->load($arrayRouteData["ROU_NEXT_TASK"]);
|
||||||
$count++;
|
$aSecJoin[$count]["ROU_PREVIOUS_TASK"] = $arrayRouteData["ROU_NEXT_TASK"];
|
||||||
}
|
$aSecJoin[$count]["ROU_PREVIOUS_TYPE"] = 'SEC-JOIN';
|
||||||
|
$count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($arrayRouteData["ROU_TYPE"] == "EVALUATE" && !empty($arrayNextTask)) {
|
if ($arrayRouteData["ROU_TYPE"] == "EVALUATE" && !empty($arrayNextTask)) {
|
||||||
@@ -1634,24 +1642,43 @@ class Derivation
|
|||||||
$this->derivate($currentDelegation2, $nextDelegations2);
|
$this->derivate($currentDelegation2, $nextDelegations2);
|
||||||
|
|
||||||
if ($delIndex > 0) {
|
if ($delIndex > 0) {
|
||||||
// Send notifications - Start
|
$flagNotification = false;
|
||||||
$oUser = new Users();
|
if ($appFields["CURRENT_USER_UID"] == '') {
|
||||||
$aUser = $oUser->load($appFields["CURRENT_USER_UID"]);
|
$oCriteriaTaskDummy = new Criteria('workflow');
|
||||||
|
$oCriteriaTaskDummy->add(TaskPeer::PRO_UID, $appFields['PRO_UID']);
|
||||||
$sFromName = $aUser["USR_FIRSTNAME"] . " " . $aUser["USR_LASTNAME"] . ($aUser["USR_EMAIL"] != "" ? " <" . $aUser["USR_EMAIL"] . ">" : "");
|
$oCriteriaTaskDummy->add(TaskPeer::TAS_UID, $appFields['TAS_UID']);
|
||||||
|
$oCriteriaTaskDummy->add(
|
||||||
try {
|
$oCriteriaTaskDummy->getNewCriterion(TaskPeer::TAS_TYPE, 'SCRIPT-TASK', Criteria::EQUAL)->addOr(
|
||||||
$oCase->sendNotifications($appFields["TAS_UID"],
|
$oCriteriaTaskDummy->getNewCriterion(TaskPeer::TAS_TYPE, 'INTERMEDIATE-THROW-EMAIL-EVENT', Criteria::EQUAL))
|
||||||
$nextDelegations2,
|
);
|
||||||
$appFields["APP_DATA"],
|
$oCriteriaTaskDummy->setLimit(1);
|
||||||
$sApplicationUID,
|
$oDataset = AppDelegationPeer::doSelectRS($oCriteriaTaskDummy);
|
||||||
$delIndex,
|
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||||
$sFromName);
|
$oDataset->next();
|
||||||
|
if ($row = $oDataset->getRow()) {
|
||||||
} catch (Exception $e) {
|
$flagNotification = true;
|
||||||
G::SendTemporalMessage(G::loadTranslation("ID_NOTIFICATION_ERROR") . " - " . $e->getMessage(), "warning", "string", null, "100%");
|
}
|
||||||
|
}
|
||||||
|
if (!$flagNotification) {
|
||||||
|
// Send notifications - Start
|
||||||
|
$oUser = new Users();
|
||||||
|
$aUser = $oUser->load($appFields["CURRENT_USER_UID"]);
|
||||||
|
|
||||||
|
$sFromName = $aUser["USR_FIRSTNAME"] . " " . $aUser["USR_LASTNAME"] . ($aUser["USR_EMAIL"] != "" ? " <" . $aUser["USR_EMAIL"] . ">" : "");
|
||||||
|
|
||||||
|
try {
|
||||||
|
$oCase->sendNotifications($appFields["TAS_UID"],
|
||||||
|
$nextDelegations2,
|
||||||
|
$appFields["APP_DATA"],
|
||||||
|
$sApplicationUID,
|
||||||
|
$delIndex,
|
||||||
|
$sFromName);
|
||||||
|
|
||||||
|
} catch (Exception $e) {
|
||||||
|
G::SendTemporalMessage(G::loadTranslation("ID_NOTIFICATION_ERROR") . " - " . $e->getMessage(), "warning", "string", null, "100%");
|
||||||
|
}
|
||||||
|
// Send notifications - End
|
||||||
}
|
}
|
||||||
// Send notifications - End
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -317,13 +317,15 @@ class PMPluginRegistry
|
|||||||
if ($eventPlugin == 1) {
|
if ($eventPlugin == 1) {
|
||||||
//$plugin = new $detail->sClassName( $detail->sNamespace, $detail->sFilename );
|
//$plugin = new $detail->sClassName( $detail->sNamespace, $detail->sFilename );
|
||||||
$this->_aPlugins[$detail->sNamespace] = $detail;
|
$this->_aPlugins[$detail->sNamespace] = $detail;
|
||||||
if (method_exists( $detail, "disable" )) {
|
// If plugin class exists check if disable method exist,
|
||||||
$detail->disable();
|
// otherwise use default plugin details
|
||||||
|
if (class_exists($detail->sClassName)) {
|
||||||
|
$plugin = new $detail->sClassName($detail->sNamespace, $detail->sFilename);
|
||||||
|
} else {
|
||||||
|
$plugin = $detail;
|
||||||
}
|
}
|
||||||
//flag Only Plugin actionsByEmail
|
if (method_exists($plugin, "disable")) {
|
||||||
if($detail->sNamespace == 'actionsByEmail'){
|
$plugin->disable();
|
||||||
$plugin = new $detail->sClassName( $detail->sNamespace, $detail->sFilename );
|
|
||||||
$plugin->disable();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3543,3 +3543,95 @@ function PMFRemoveUsersToGroup($groupUid, array $users)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
*
|
||||||
|
* Copy or attach a file to a Case
|
||||||
|
*
|
||||||
|
* @name PMFCopyDocumentCase
|
||||||
|
* @label PMF Copy Document Case
|
||||||
|
*
|
||||||
|
* @param string | $appDocUid | Document Application ID | The unique Uid of the Document.
|
||||||
|
* @param int | $versionNumber | Version Number | Is the document version.
|
||||||
|
* @param string | $targetCaseUid | Case ID | Is the target case uid where we want to copy the document to.
|
||||||
|
* @param string | $inputDocumentUid =null | InputDocument ID | Optional parameter. Is the input document that we want to associate with in the target case. If is not specified then the file is uploaded as attachment in the case (not associated to any input document).
|
||||||
|
*
|
||||||
|
* @return string | $newUidAppDocUid | ID of the document | Returns ID if it has copied the input document successfully; otherwise, returns exception if an error occurred.
|
||||||
|
*/
|
||||||
|
function PMFCopyDocumentCase($appDocUid, $versionNumber, $targetCaseUid, $inputDocumentUid = null)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$messageError = 'function:PMFCopyDocumentCase Error!, ';
|
||||||
|
$appDocument = new AppDocument();
|
||||||
|
$dataFields = $appDocument->load($appDocUid, $versionNumber);
|
||||||
|
if (!$dataFields) {
|
||||||
|
throw new Exception($messageError . 'The AppDocUid does not exist');
|
||||||
|
}
|
||||||
|
$arrayFieldData = array(
|
||||||
|
"APP_UID" => $targetCaseUid,
|
||||||
|
"DEL_INDEX" => $dataFields['DEL_INDEX'],
|
||||||
|
"USR_UID" => $dataFields['USR_UID'],
|
||||||
|
"DOC_UID" => ($inputDocumentUid != null) ? $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'],
|
||||||
|
"APP_DOC_TITLE" => $dataFields['APP_DOC_TITLE'],
|
||||||
|
"APP_DOC_FILENAME" => $dataFields['APP_DOC_TITLE'],
|
||||||
|
"FOLDER_UID" => $dataFields['FOLDER_UID'],
|
||||||
|
"APP_DOC_TAGS" => $dataFields['APP_DOC_TAGS']
|
||||||
|
);
|
||||||
|
|
||||||
|
$arrayInfo = pathinfo($appDocument->getAppDocFilename());
|
||||||
|
$ext = (isset($arrayInfo['extension']) ? $arrayInfo['extension'] : '');
|
||||||
|
$parcialPath = G::getPathFromUID($dataFields['APP_UID']);
|
||||||
|
$file = G::getPathFromFileUID($dataFields['APP_UID'], $dataFields['APP_DOC_UID']);
|
||||||
|
$realPath = PATH_DOCUMENT . $parcialPath . '/' . $file[0] . $file[1] . '_' . $versionNumber . '.' . $ext;
|
||||||
|
$strFileName = $dataFields['APP_DOC_UID'] . '_' . $versionNumber . '.' . $ext;
|
||||||
|
$newUidAppDocUid = null;
|
||||||
|
if ($dataFields['APP_DOC_TYPE'] == 'INPUT') {
|
||||||
|
if (file_exists($realPath)) {
|
||||||
|
$strPathName = PATH_DOCUMENT . G::getPathFromUID($targetCaseUid) . PATH_SEP;
|
||||||
|
if (!is_dir($strPathName)) {
|
||||||
|
G::mk_dir($strPathName);
|
||||||
|
}
|
||||||
|
$appNewDocument = new AppDocument();
|
||||||
|
$newUidAppDocUid = $appNewDocument->create($arrayFieldData);
|
||||||
|
$appNewDocument->setAppDocTitle($dataFields['APP_DOC_TITLE']);
|
||||||
|
$appNewDocument->setAppDocComment($dataFields['APP_DOC_COMMENT']);
|
||||||
|
$appNewDocument->setAppDocFilename($dataFields['APP_DOC_FILENAME']);
|
||||||
|
$newStrFileName = $newUidAppDocUid . '_' . $versionNumber . '.' . $ext;
|
||||||
|
$resultCopy = copy($realPath, $strPathName . $newStrFileName);
|
||||||
|
if (!$resultCopy) {
|
||||||
|
throw new Exception($messageError, 'Could not copy the document');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new Exception($messageError, 'The document for copy does not exist');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$pathOutput = PATH_DOCUMENT . G::getPathFromUID($dataFields['APP_UID']) . PATH_SEP . 'outdocs' . PATH_SEP;
|
||||||
|
if (is_dir($pathOutput)) {
|
||||||
|
@chmod($pathOutput, 0755);
|
||||||
|
$strPathName = PATH_DOCUMENT . G::getPathFromUID($targetCaseUid) . PATH_SEP . 'outdocs' . PATH_SEP;
|
||||||
|
if (!is_dir($strPathName)) {
|
||||||
|
G::mk_dir($strPathName);
|
||||||
|
}
|
||||||
|
@chmod($strPathName, 0755);
|
||||||
|
$oAppDocument = new AppDocument();
|
||||||
|
$newUidAppDocUid = $oAppDocument->create($arrayFieldData);
|
||||||
|
$arrayExtension = array('doc', 'html', 'pdf');
|
||||||
|
$newStrFilename = $newUidAppDocUid . '_' . $versionNumber;
|
||||||
|
foreach ($arrayExtension as $item) {
|
||||||
|
$resultCopy = copy($pathOutput . $strFileName . $item, $strPathName . $newStrFilename . '.' . $item);
|
||||||
|
if (!$resultCopy) {
|
||||||
|
throw new Exception($messageError, 'Could not copy the document');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new Exception($messageError, 'The document for copy does not exist');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $newUidAppDocUid;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ class AppNotes extends BaseAppNotes
|
|||||||
|
|
||||||
$case = new Cases();
|
$case = new Cases();
|
||||||
|
|
||||||
$p = $case->getUsersParticipatedInCase($applicationUid);
|
$p = $case->getUsersParticipatedInCase($applicationUid, 'ACTIVE');
|
||||||
$noteRecipientsList = array();
|
$noteRecipientsList = array();
|
||||||
|
|
||||||
foreach ($p["array"] as $key => $userParticipated) {
|
foreach ($p["array"] as $key => $userParticipated) {
|
||||||
|
|||||||
@@ -43,23 +43,37 @@ class DashletInstance extends BaseDashletInstance
|
|||||||
unset($data[$field]);
|
unset($data[$field]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($additionalFields)) {
|
|
||||||
$data['DAS_INS_ADDITIONAL_PROPERTIES'] = serialize($additionalFields);
|
|
||||||
} else {
|
|
||||||
$data['DAS_INS_ADDITIONAL_PROPERTIES'] = '';
|
|
||||||
}
|
|
||||||
$connection = Propel::getConnection(DashletInstancePeer::DATABASE_NAME);
|
$connection = Propel::getConnection(DashletInstancePeer::DATABASE_NAME);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!isset($data['DAS_INS_UID'])) {
|
if (!isset($data['DAS_INS_UID'])) {
|
||||||
$data['DAS_INS_UID'] = '';
|
$data['DAS_INS_UID'] = '';
|
||||||
}
|
}
|
||||||
if ($data['DAS_INS_UID'] == '') {
|
if ($data['DAS_INS_UID'] == '') {
|
||||||
$data['DAS_INS_UID'] = G::generateUniqueID();
|
|
||||||
$data['DAS_INS_CREATE_DATE'] = date('Y-m-d H:i:s');
|
|
||||||
$dashletInstance = new DashletInstance();
|
$dashletInstance = new DashletInstance();
|
||||||
|
|
||||||
|
$data['DAS_INS_UID'] = G::generateUniqueID();
|
||||||
|
$data['DAS_INS_ADDITIONAL_PROPERTIES'] = (!empty($additionalFields))? serialize($additionalFields) : '';
|
||||||
|
$data['DAS_INS_CREATE_DATE'] = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
$msg = 'CreateDashletInstance';
|
$msg = 'CreateDashletInstance';
|
||||||
} else {
|
} else {
|
||||||
$dashletInstance = DashletInstancePeer::retrieveByPK($data['DAS_INS_UID']);
|
$dashletInstance = DashletInstancePeer::retrieveByPK($data['DAS_INS_UID']);
|
||||||
|
|
||||||
|
if (!empty($additionalFields)) {
|
||||||
|
$arrayAdditionalProperties = [];
|
||||||
|
|
||||||
|
if ($dashletInstance->getDasInsAdditionalProperties() != '') {
|
||||||
|
$arrayAux = unserialize($dashletInstance->getDasInsAdditionalProperties());
|
||||||
|
$arrayAdditionalProperties = (is_array($arrayAux))? $arrayAux : $arrayAdditionalProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
$additionalFields = array_merge($arrayAdditionalProperties, $additionalFields);
|
||||||
|
|
||||||
|
$data['DAS_INS_ADDITIONAL_PROPERTIES'] = serialize($additionalFields);
|
||||||
|
}
|
||||||
|
|
||||||
$msg = 'UpdateDashletInstance';
|
$msg = 'UpdateDashletInstance';
|
||||||
}
|
}
|
||||||
$data['DAS_INS_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
$data['DAS_INS_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: ProcessMaker (Branch 3.0.1.8)\n"
|
"Project-Id-Version: ProcessMaker (Branch 3.1)\n"
|
||||||
"POT-Creation-Date: \n"
|
"POT-Creation-Date: \n"
|
||||||
"PO-Revision-Date: 2016-03-30 19:23:50\n"
|
"PO-Revision-Date: 2016-07-05 12:03:37\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: Colosa Developers Team <developers@colosa.com>\n"
|
"Language-Team: Colosa Developers Team <developers@colosa.com>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@@ -3436,8 +3436,8 @@ msgstr "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified
|
|||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_UPLOAD_ERR_INI_SIZE
|
# LABEL/ID_UPLOAD_ERR_INI_SIZE
|
||||||
#: LABEL/ID_UPLOAD_ERR_INI_SIZE
|
#: LABEL/ID_UPLOAD_ERR_INI_SIZE
|
||||||
msgid "The uploaded file exceeds the upload_max_filesize or post_max_size directive in php.ini"
|
msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini"
|
||||||
msgstr "The uploaded file exceeds the upload_max_filesize or post_max_size directive in php.ini"
|
msgstr "The uploaded file exceeds the upload_max_filesize directive in php.ini"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_NOT_PROCESS_RELATED
|
# LABEL/ID_NOT_PROCESS_RELATED
|
||||||
@@ -3814,8 +3814,8 @@ msgstr "Process Supervisor"
|
|||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_SENT
|
# LABEL/ID_SENT
|
||||||
#: LABEL/ID_SENT
|
#: LABEL/ID_SENT
|
||||||
msgid "Participated"
|
msgid "[LABEL/ID_SENT] Sent"
|
||||||
msgstr "Participated"
|
msgstr "Sent"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_CALENDAR
|
# LABEL/ID_CALENDAR
|
||||||
@@ -3973,12 +3973,6 @@ msgstr "No fields found!"
|
|||||||
msgid "Unassigned"
|
msgid "Unassigned"
|
||||||
msgstr "Unassigned"
|
msgstr "Unassigned"
|
||||||
|
|
||||||
# TRANSLATION
|
|
||||||
# LABEL/ID_UNASSIGNED_STATUS
|
|
||||||
#: LABEL/ID_UNASSIGNED_STATUS
|
|
||||||
msgid "Unassigned Status"
|
|
||||||
msgstr "Unassigned Status"
|
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_CLAIM
|
# LABEL/ID_CLAIM
|
||||||
#: LABEL/ID_CLAIM
|
#: LABEL/ID_CLAIM
|
||||||
@@ -4924,7 +4918,7 @@ msgstr "Draft"
|
|||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_TITLE_PARTICIPATED
|
# LABEL/ID_TITLE_PARTICIPATED
|
||||||
#: LABEL/ID_TITLE_PARTICIPATED
|
#: LABEL/ID_TITLE_PARTICIPATED
|
||||||
msgid "[LABEL/ID_TITLE_PARTICIPATED] Participated"
|
msgid "Participated"
|
||||||
msgstr "Participated"
|
msgstr "Participated"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
@@ -5059,12 +5053,6 @@ msgstr "Language deleted successfully!"
|
|||||||
msgid "There is {0} cases started with this language, delete action canceled!"
|
msgid "There is {0} cases started with this language, delete action canceled!"
|
||||||
msgstr "There is {0} cases started with this language, delete action canceled!"
|
msgstr "There is {0} cases started with this language, delete action canceled!"
|
||||||
|
|
||||||
# TRANSLATION
|
|
||||||
# LABEL/ID_CANNOT_REMOVE_TEMPLATE_EMAIL_EVENT
|
|
||||||
#: LABEL/ID_CANNOT_REMOVE_TEMPLATE_EMAIL_EVENT
|
|
||||||
msgid "You can not delete the template {0} because it has a relationship with Email Event"
|
|
||||||
msgstr "You can not delete the template {0} because it has a relationship with Email Event"
|
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_TOTAL_CASES
|
# LABEL/ID_TOTAL_CASES
|
||||||
#: LABEL/ID_TOTAL_CASES
|
#: LABEL/ID_TOTAL_CASES
|
||||||
@@ -6781,18 +6769,6 @@ msgstr "Departments"
|
|||||||
msgid "Department Name"
|
msgid "Department Name"
|
||||||
msgstr "Department Name"
|
msgstr "Department Name"
|
||||||
|
|
||||||
# TRANSLATION
|
|
||||||
# LABEL/ID_DEPARTMENT_ERROR_CREATE
|
|
||||||
#: LABEL/ID_DEPARTMENT_ERROR_CREATE
|
|
||||||
msgid "Error creating department"
|
|
||||||
msgstr "Error creating department"
|
|
||||||
|
|
||||||
# TRANSLATION
|
|
||||||
# LABEL/ID_DEPARTMENT_CHECK_PARENT_DEPARTMENT
|
|
||||||
#: LABEL/ID_DEPARTMENT_CHECK_PARENT_DEPARTMENT
|
|
||||||
msgid "It's necessary to check the parent-department: {0} for the sub-department: {1}"
|
|
||||||
msgstr "It's necessary to check the parent-department: {0} for the sub-department: {1}"
|
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_CONFIRM_CANCEL_CASE
|
# LABEL/ID_CONFIRM_CANCEL_CASE
|
||||||
#: LABEL/ID_CONFIRM_CANCEL_CASE
|
#: LABEL/ID_CONFIRM_CANCEL_CASE
|
||||||
@@ -9541,12 +9517,6 @@ msgstr "Uploading the process file..."
|
|||||||
msgid "The process you are trying to import already exists. Please select one of the following options to continue:"
|
msgid "The process you are trying to import already exists. Please select one of the following options to continue:"
|
||||||
msgstr "The process you are trying to import already exists. Please select one of the following options to continue:"
|
msgstr "The process you are trying to import already exists. Please select one of the following options to continue:"
|
||||||
|
|
||||||
# TRANSLATION
|
|
||||||
# LABEL/ID_PROCESS_DEFINITION_INCOMPLETE
|
|
||||||
#: LABEL/ID_PROCESS_DEFINITION_INCOMPLETE
|
|
||||||
msgid "To create a new process all the process objects must be selected/included in the pmx2 file."
|
|
||||||
msgstr "To create a new process all the process objects must be selected/included in the pmx2 file."
|
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_DEBUG_MESSAGE
|
# LABEL/ID_DEBUG_MESSAGE
|
||||||
#: LABEL/ID_DEBUG_MESSAGE
|
#: LABEL/ID_DEBUG_MESSAGE
|
||||||
@@ -14566,8 +14536,8 @@ msgstr "Failure to do so could lead your ProcessMaker installation not functioni
|
|||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_PHP
|
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_PHP
|
||||||
#: LABEL/ID_PROCESSMAKER_REQUIREMENTS_PHP
|
#: LABEL/ID_PROCESSMAKER_REQUIREMENTS_PHP
|
||||||
msgid "PHP Version >= 5.5.33"
|
msgid "PHP recommended version 5.6 or higher (7.0 not supported)"
|
||||||
msgstr "PHP Version >= 5.5.33"
|
msgstr "PHP recommended version 5.6 or higher (7.0 not supported)"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_MYSQL
|
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_MYSQL
|
||||||
@@ -14626,8 +14596,8 @@ msgstr "LDAP Support (*)"
|
|||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_MEMORYLIMIT
|
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_MEMORYLIMIT
|
||||||
#: LABEL/ID_PROCESSMAKER_REQUIREMENTS_MEMORYLIMIT
|
#: LABEL/ID_PROCESSMAKER_REQUIREMENTS_MEMORYLIMIT
|
||||||
msgid "Memory Limit >= 256M"
|
msgid "Memory Limit >= 80M"
|
||||||
msgstr "Memory Limit >= 256M"
|
msgstr "Memory Limit >= 80M"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_ADMINISTRATOR_ROLE_CANT_CHANGED
|
# LABEL/ID_ADMINISTRATOR_ROLE_CANT_CHANGED
|
||||||
@@ -19399,6 +19369,12 @@ msgstr "Lane"
|
|||||||
msgid "[LABEL/ID_MAFE_03937134cedab9078be39a77ee3a48a0] Group"
|
msgid "[LABEL/ID_MAFE_03937134cedab9078be39a77ee3a48a0] Group"
|
||||||
msgstr "Group"
|
msgstr "Group"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_MAFE_7215ee9c7d9dc229d2921a40e899ec5f
|
||||||
|
#: LABEL/ID_MAFE_7215ee9c7d9dc229d2921a40e899ec5f
|
||||||
|
msgid "[LABEL/ID_MAFE_7215ee9c7d9dc229d2921a40e899ec5f] "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_MAFE_5308fcbb3c60d1cb24e45795bf9a0b7e
|
# LABEL/ID_MAFE_5308fcbb3c60d1cb24e45795bf9a0b7e
|
||||||
#: LABEL/ID_MAFE_5308fcbb3c60d1cb24e45795bf9a0b7e
|
#: LABEL/ID_MAFE_5308fcbb3c60d1cb24e45795bf9a0b7e
|
||||||
@@ -24415,24 +24391,12 @@ msgstr "The user with \"{0}\" is invalid to cancel the Case."
|
|||||||
msgid "The user with \"{0}\" did not have permission to perform this action."
|
msgid "The user with \"{0}\" did not have permission to perform this action."
|
||||||
msgstr "The user with \"{0}\" did not have permission to perform this action."
|
msgstr "The user with \"{0}\" did not have permission to perform this action."
|
||||||
|
|
||||||
# TRANSLATION
|
|
||||||
# LABEL/ID_NOT_EXECUTE_QUERY
|
|
||||||
#: LABEL/ID_NOT_EXECUTE_QUERY
|
|
||||||
msgid "Changes to {0} are forbidden. Please contact system administrator for more information."
|
|
||||||
msgstr "Changes to {0} are forbidden. Please contact system administrator for more information."
|
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_EMAIL_MORE_THAN_ONE_USER
|
# LABEL/ID_EMAIL_MORE_THAN_ONE_USER
|
||||||
#: LABEL/ID_EMAIL_MORE_THAN_ONE_USER
|
#: LABEL/ID_EMAIL_MORE_THAN_ONE_USER
|
||||||
msgid "This email is assigned to more than one user. Please contact your administrator."
|
msgid "This email is assigned to more than one user. Please contact your administrator."
|
||||||
msgstr "This email is assigned to more than one user. Please contact your administrator."
|
msgstr "This email is assigned to more than one user. Please contact your administrator."
|
||||||
|
|
||||||
# TRANSLATION
|
|
||||||
# LABEL/ID_EMAIL_EVENT_DEFINITION_DOES_NOT_EXIST
|
|
||||||
#: LABEL/ID_EMAIL_EVENT_DEFINITION_DOES_NOT_EXIST
|
|
||||||
msgid "The email event definition does not exist."
|
|
||||||
msgstr "The email event definition does not exist."
|
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_USER_DOES_NOT_CORRESPOND
|
# LABEL/ID_USER_DOES_NOT_CORRESPOND
|
||||||
#: LABEL/ID_USER_DOES_NOT_CORRESPOND
|
#: LABEL/ID_USER_DOES_NOT_CORRESPOND
|
||||||
@@ -27311,12 +27275,6 @@ msgstr "Please try later."
|
|||||||
msgid "There was a problem sending the email to"
|
msgid "There was a problem sending the email to"
|
||||||
msgstr "There was a problem sending the email to"
|
msgstr "There was a problem sending the email to"
|
||||||
|
|
||||||
# TRANSLATION
|
|
||||||
# LABEL/ID_USER_CANT_BE_DELETED_FOR_THE_PROCESS
|
|
||||||
#: LABEL/ID_USER_CANT_BE_DELETED_FOR_THE_PROCESS
|
|
||||||
msgid "The user can't be deleted because it is referenced in the process {processTitle} in a process permission."
|
|
||||||
msgstr "The user can't be deleted because it is referenced in the process {processTitle} in a process permission."
|
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_MAFE_c5d84b6c19cb058b7b5471b30e926823
|
# LABEL/ID_MAFE_c5d84b6c19cb058b7b5471b30e926823
|
||||||
#: LABEL/ID_MAFE_c5d84b6c19cb058b7b5471b30e926823
|
#: LABEL/ID_MAFE_c5d84b6c19cb058b7b5471b30e926823
|
||||||
@@ -27344,8 +27302,8 @@ msgstr "There are problems loading the process objects."
|
|||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_MAFE_f4b5974fd11406f8410fa7e8502a26a3
|
# LABEL/ID_MAFE_f4b5974fd11406f8410fa7e8502a26a3
|
||||||
#: LABEL/ID_MAFE_f4b5974fd11406f8410fa7e8502a26a3
|
#: LABEL/ID_MAFE_f4b5974fd11406f8410fa7e8502a26a3
|
||||||
msgid "[LABEL/ID_MAFE_f4b5974fd11406f8410fa7e8502a26a3] Custom"
|
msgid "Granular"
|
||||||
msgstr "Custom"
|
msgstr "Granular"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_MAFE_84f6ae383a4278397861eb8c783fe1d8
|
# LABEL/ID_MAFE_84f6ae383a4278397861eb8c783fe1d8
|
||||||
@@ -27359,6 +27317,150 @@ msgstr "Export Process Objects"
|
|||||||
msgid "[LABEL/ID_MAFE_5e9df908eafa83cb51c0a3720e8348c7] Check All"
|
msgid "[LABEL/ID_MAFE_5e9df908eafa83cb51c0a3720e8348c7] Check All"
|
||||||
msgstr "Check All"
|
msgstr "Check All"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_UNASSIGNED_STATUS
|
||||||
|
#: LABEL/ID_UNASSIGNED_STATUS
|
||||||
|
msgid "Unassigned Status"
|
||||||
|
msgstr "Unassigned Status"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_ROUTE_TO_TASK_INTERMEDIATE-THROW-EMAIL-EVENT
|
||||||
|
#: LABEL/ID_ROUTE_TO_TASK_INTERMEDIATE-THROW-EMAIL-EVENT
|
||||||
|
msgid "The following case is a \"Intermediate Email Event\""
|
||||||
|
msgstr "The following case is a \"Intermediate Email Event\""
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_REASON_REASSIGN
|
||||||
|
#: LABEL/ID_REASON_REASSIGN
|
||||||
|
msgid "Reason to reassign this case"
|
||||||
|
msgstr "Reason to reassign this case"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_YOU_DO_NOT_HAVE_PERMISSION
|
||||||
|
#: LABEL/ID_YOU_DO_NOT_HAVE_PERMISSION
|
||||||
|
msgid "Error: You do not have permission."
|
||||||
|
msgstr "Error: You do not have permission."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_THE_APPLICATION_IS_NOT_CANCELED
|
||||||
|
#: LABEL/ID_THE_APPLICATION_IS_NOT_CANCELED
|
||||||
|
msgid "Error: The application {0} is not canceled."
|
||||||
|
msgstr "Error: The application {0} is not canceled."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_THREAD_STATUS_DOES_NOT_EXIST_FOR_THE_APPLICATION
|
||||||
|
#: LABEL/ID_THREAD_STATUS_DOES_NOT_EXIST_FOR_THE_APPLICATION
|
||||||
|
msgid "Error: Thread status does not exist for the application {0}."
|
||||||
|
msgstr "Error: Thread status does not exist for the application {0}."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_NO_PREVIOUS_USR_UID
|
||||||
|
#: LABEL/ID_NO_PREVIOUS_USR_UID
|
||||||
|
msgid "The previuos task doesn't have any users."
|
||||||
|
msgstr "The previuos task doesn't have any users."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_WARNING_GATEWAY_CONVERGENT_WITH_CONDITION
|
||||||
|
#: LABEL/ID_WARNING_GATEWAY_CONVERGENT_WITH_CONDITION
|
||||||
|
msgid "Your Gateway Convergent has a condition, save again your process."
|
||||||
|
msgstr "Your Gateway Convergent has a condition, save again your process."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_RT_RENAME_NAME_TABLE
|
||||||
|
#: LABEL/ID_RT_RENAME_NAME_TABLE
|
||||||
|
msgid "All references to the previous table name are going to be invalid. Do you really want to change the table name?"
|
||||||
|
msgstr "All references to the previous table name are going to be invalid. Do you really want to change the table name?"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_RT_CONTINUE_TABLE_RENAME
|
||||||
|
#: LABEL/ID_RT_CONTINUE_TABLE_RENAME
|
||||||
|
msgid "Continue renaming the table"
|
||||||
|
msgstr "Continue renaming the table"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_RT_NOT_CHANGE_NAME
|
||||||
|
#: LABEL/ID_RT_NOT_CHANGE_NAME
|
||||||
|
msgid "Do not change name"
|
||||||
|
msgstr "Do not change name"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_EXTERNAL_REGISTRATION
|
||||||
|
#: LABEL/ID_EXTERNAL_REGISTRATION
|
||||||
|
msgid "External Registration"
|
||||||
|
msgstr "External Registration"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_FILTER_BY
|
||||||
|
#: LABEL/ID_FILTER_BY
|
||||||
|
msgid "Filter By"
|
||||||
|
msgstr "Filter By"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_MAFE_cae0206c31eaa305dd0e847330c5e837
|
||||||
|
#: LABEL/ID_MAFE_cae0206c31eaa305dd0e847330c5e837
|
||||||
|
msgid "wildcard"
|
||||||
|
msgstr "wildcard"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_MAFE_8efa191bcfbd509f1be06c9eac30cb9c
|
||||||
|
#: LABEL/ID_MAFE_8efa191bcfbd509f1be06c9eac30cb9c
|
||||||
|
msgid "Fields marked with asterisk (%%ASTERISK%%) are required."
|
||||||
|
msgstr "Fields marked with asterisk (%%ASTERISK%%) are required."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_MAFE_c7f8f8652db6d74e086d297129179d2f
|
||||||
|
#: LABEL/ID_MAFE_c7f8f8652db6d74e086d297129179d2f
|
||||||
|
msgid "Task/sub-process name can't be empty"
|
||||||
|
msgstr "Task/sub-process name can't be empty"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_EMAIL_EVENT_CONFIGURATION_EMAIL
|
||||||
|
#: LABEL/ID_EMAIL_EVENT_CONFIGURATION_EMAIL
|
||||||
|
msgid "Email event: {0}, in process: {1}, cannot send any mail because its configuration needs to be completed."
|
||||||
|
msgstr "Email event: {0}, in process: {1}, cannot send any mail because its configuration needs to be completed."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_CANNOT_REMOVE_TEMPLATE_EMAIL_EVENT
|
||||||
|
#: LABEL/ID_CANNOT_REMOVE_TEMPLATE_EMAIL_EVENT
|
||||||
|
msgid "You can not delete the template {0} because it has a relationship with Email Event"
|
||||||
|
msgstr "You can not delete the template {0} because it has a relationship with Email Event"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_DEPARTMENT_ERROR_CREATE
|
||||||
|
#: LABEL/ID_DEPARTMENT_ERROR_CREATE
|
||||||
|
msgid "Error creating department"
|
||||||
|
msgstr "Error creating department"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_DEPARTMENT_CHECK_PARENT_DEPARTMENT
|
||||||
|
#: LABEL/ID_DEPARTMENT_CHECK_PARENT_DEPARTMENT
|
||||||
|
msgid "It's necessary to check the parent-department: {0} for the sub-department: {1}"
|
||||||
|
msgstr "It's necessary to check the parent-department: {0} for the sub-department: {1}"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_PROCESS_DEFINITION_INCOMPLETE
|
||||||
|
#: LABEL/ID_PROCESS_DEFINITION_INCOMPLETE
|
||||||
|
msgid "To create a new process all the process objects must be selected/included in the pmx2 file."
|
||||||
|
msgstr "To create a new process all the process objects must be selected/included in the pmx2 file."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_NOT_EXECUTE_QUERY
|
||||||
|
#: LABEL/ID_NOT_EXECUTE_QUERY
|
||||||
|
msgid "Changes to {0} are forbidden. Please contact system administrator for more information."
|
||||||
|
msgstr "Changes to {0} are forbidden. Please contact system administrator for more information."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_EMAIL_EVENT_DEFINITION_DOES_NOT_EXIST
|
||||||
|
#: LABEL/ID_EMAIL_EVENT_DEFINITION_DOES_NOT_EXIST
|
||||||
|
msgid "The email event definition does not exist."
|
||||||
|
msgstr "The email event definition does not exist."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_USER_CANT_BE_DELETED_FOR_THE_PROCESS
|
||||||
|
#: LABEL/ID_USER_CANT_BE_DELETED_FOR_THE_PROCESS
|
||||||
|
msgid "The user can't be deleted because it is referenced in the process {processTitle} in a process permission."
|
||||||
|
msgstr "The user can't be deleted because it is referenced in the process {processTitle} in a process permission."
|
||||||
|
|
||||||
# additionalTables/additionalTablesData.xml?ADD_TAB_NAME
|
# additionalTables/additionalTablesData.xml?ADD_TAB_NAME
|
||||||
# additionalTables/additionalTablesData.xml
|
# additionalTables/additionalTablesData.xml
|
||||||
#: text - ADD_TAB_NAME
|
#: text - ADD_TAB_NAME
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class Installer extends Controller
|
|||||||
$info->memory = new stdclass();
|
$info->memory = new stdclass();
|
||||||
|
|
||||||
$info->php->version = phpversion();
|
$info->php->version = phpversion();
|
||||||
$info->php->result = version_compare(phpversion(), '5.5.33') >= 0 ? true : false;
|
$info->php->result = (version_compare(phpversion(), '5.4', '>=') && version_compare(phpversion(), '7.0', '<')) ? true : false;
|
||||||
|
|
||||||
// MYSQL info and verification
|
// MYSQL info and verification
|
||||||
$info->mysql->result = false;
|
$info->mysql->result = false;
|
||||||
@@ -727,7 +727,7 @@ class Installer extends Controller
|
|||||||
$rb_workpace = $wf;
|
$rb_workpace = $wf;
|
||||||
$rp_workpace = $wf;
|
$rp_workpace = $wf;
|
||||||
if (!$userLogged) {
|
if (!$userLogged) {
|
||||||
$wfPass = G::generate_password( 12 );
|
$wfPass = G::generate_password( 15 );
|
||||||
$this->setGrantPrivilegesMySQL( $wf, $wfPass, $wf, $db_hostname );
|
$this->setGrantPrivilegesMySQL( $wf, $wfPass, $wf, $db_hostname );
|
||||||
$this->setGrantPrivilegesMySQL( $rb, $wfPass, $wf, $db_hostname );
|
$this->setGrantPrivilegesMySQL( $rb, $wfPass, $wf, $db_hostname );
|
||||||
$this->setGrantPrivilegesMySQL( $rp, $wfPass, $wf, $db_hostname );
|
$this->setGrantPrivilegesMySQL( $rp, $wfPass, $wf, $db_hostname );
|
||||||
@@ -1064,7 +1064,7 @@ class Installer extends Controller
|
|||||||
$this->mssqlQuery( $q );
|
$this->mssqlQuery( $q );
|
||||||
|
|
||||||
//CREATE users and GRANT Privileges
|
//CREATE users and GRANT Privileges
|
||||||
$wfPass = G::generate_password( 12 );
|
$wfPass = G::generate_password( 15 );
|
||||||
$this->setGrantPrivilegesMSSQL( $wf, $wfPass, $wf );
|
$this->setGrantPrivilegesMSSQL( $wf, $wfPass, $wf );
|
||||||
|
|
||||||
//Generate the db.php file and folders
|
//Generate the db.php file and folders
|
||||||
|
|||||||
@@ -101,6 +101,10 @@ class pmTables extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (preg_match("/^PMT_(.*)$/", $table['ADD_TAB_NAME'], $match)) {
|
||||||
|
$table['ADD_TAB_NAME'] = $match[1];
|
||||||
|
}
|
||||||
|
|
||||||
$this->includeExtJS( 'pmTables/' . $jsFile );
|
$this->includeExtJS( 'pmTables/' . $jsFile );
|
||||||
|
|
||||||
$this->setJSVar( 'flagProcessmap', (isset($_REQUEST['flagProcessmap'])) ? $_REQUEST['flagProcessmap'] : 0);
|
$this->setJSVar( 'flagProcessmap', (isset($_REQUEST['flagProcessmap'])) ? $_REQUEST['flagProcessmap'] : 0);
|
||||||
|
|||||||
@@ -34,6 +34,15 @@
|
|||||||
//require_once 'classes/model/Process.php';
|
//require_once 'classes/model/Process.php';
|
||||||
//require_once 'classes/model/Task.php';
|
//require_once 'classes/model/Task.php';
|
||||||
|
|
||||||
|
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||||
|
$responseObject = new stdclass();
|
||||||
|
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||||
|
$responseObject->success = true;
|
||||||
|
$responseObject->lostSession = true;
|
||||||
|
print G::json_encode( $responseObject );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
G::LoadSystem('inputfilter');
|
G::LoadSystem('inputfilter');
|
||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||||
|
$responseObject = new stdclass();
|
||||||
|
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||||
|
$responseObject->success = true;
|
||||||
|
$responseObject->lostSession = true;
|
||||||
|
print G::json_encode( $responseObject );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||||
|
|
||||||
|
|||||||
@@ -22,18 +22,12 @@
|
|||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||||
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
|
$responseObject = new stdclass();
|
||||||
die( '<script type="text/javascript">
|
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||||
try
|
$responseObject->success = true;
|
||||||
{
|
$responseObject->lostSession = true;
|
||||||
prnt = parent.parent;
|
print G::json_encode( $responseObject );
|
||||||
top.location = top.location;
|
die();
|
||||||
}
|
|
||||||
catch (err)
|
|
||||||
{
|
|
||||||
parent.location = parent.location;
|
|
||||||
}
|
|
||||||
</script>');
|
|
||||||
}
|
}
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
|
|||||||
@@ -23,8 +23,16 @@
|
|||||||
*/
|
*/
|
||||||
//validate the data post
|
//validate the data post
|
||||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||||
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
|
if(!strpos($_SERVER['REQUEST_URI'], 'gmail')) {
|
||||||
die( '<script type="text/javascript">
|
$responseObject = new stdclass();
|
||||||
|
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||||
|
$responseObject->success = true;
|
||||||
|
$responseObject->lostSession = true;
|
||||||
|
print G::json_encode( $responseObject );
|
||||||
|
die();
|
||||||
|
} else {
|
||||||
|
G::SendTemporalMessage('ID_LOGIN_AGAIN', 'warning', 'labels');
|
||||||
|
die('<script type="text/javascript">
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var olink = document.location.href;
|
var olink = document.location.href;
|
||||||
@@ -58,6 +66,7 @@ if (!isset($_SESSION['USER_LOGGED'])) {
|
|||||||
parent.location = parent.location;
|
parent.location = parent.location;
|
||||||
}
|
}
|
||||||
</script>');
|
</script>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$filter = new InputFilter();
|
||||||
|
|
||||||
|
list($_GET['UID'], $_GET['TYPE'], $_GET['POSITION'], $_GET['ACTION']) = $filter->xssRegexFilter(
|
||||||
|
[$_GET['UID'], $_GET['TYPE'], $_GET['POSITION'], $_GET['ACTION']], '/[\-\w]/'
|
||||||
|
);
|
||||||
|
|
||||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||||
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
|
if(!strpos($_SERVER['REQUEST_URI'], 'gmail')) {
|
||||||
die( '<script type="text/javascript">
|
$responseObject = new stdclass();
|
||||||
|
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||||
|
$responseObject->success = true;
|
||||||
|
$responseObject->lostSession = true;
|
||||||
|
print G::json_encode( $responseObject );
|
||||||
|
die();
|
||||||
|
} else {
|
||||||
|
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
|
||||||
|
die( '<script type="text/javascript">
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var olink = document.location.href;
|
var olink = document.location.href;
|
||||||
@@ -36,6 +50,7 @@ if (!isset($_SESSION['USER_LOGGED'])) {
|
|||||||
parent.location = parent.location;
|
parent.location = parent.location;
|
||||||
}
|
}
|
||||||
</script>');
|
</script>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once 'classes/model/AppDelegation.php';
|
require_once 'classes/model/AppDelegation.php';
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
G::LoadSystem('inputfilter');
|
|
||||||
$filter = new InputFilter();
|
|
||||||
$_GET = $filter->xssFilterHard($_GET);
|
|
||||||
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
|
||||||
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
|
|
||||||
|
|
||||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||||
$responseObject = new stdclass();
|
$responseObject = new stdclass();
|
||||||
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||||
@@ -14,6 +8,12 @@ if (!isset($_SESSION['USER_LOGGED'])) {
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G::LoadSystem('inputfilter');
|
||||||
|
$filter = new InputFilter();
|
||||||
|
$_GET = $filter->xssFilterHard($_GET);
|
||||||
|
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
||||||
|
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
|
||||||
|
|
||||||
//Getting the extJs parameters
|
//Getting the extJs parameters
|
||||||
$callback = isset( $_REQUEST["callback"] ) ? $_REQUEST["callback"] : "stcCallback1001";
|
$callback = isset( $_REQUEST["callback"] ) ? $_REQUEST["callback"] : "stcCallback1001";
|
||||||
$dir = isset( $_REQUEST["dir"] ) ? $_REQUEST["dir"] : "DESC";
|
$dir = isset( $_REQUEST["dir"] ) ? $_REQUEST["dir"] : "DESC";
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
G::LoadSystem('inputfilter');
|
|
||||||
$filter = new InputFilter();
|
|
||||||
$_GET = $filter->xssFilterHard($_GET);
|
|
||||||
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
|
||||||
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
|
|
||||||
|
|
||||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||||
$responseObject = new stdclass();
|
$responseObject = new stdclass();
|
||||||
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||||
@@ -14,6 +8,12 @@ if (!isset($_SESSION['USER_LOGGED'])) {
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G::LoadSystem('inputfilter');
|
||||||
|
$filter = new InputFilter();
|
||||||
|
$_GET = $filter->xssFilterHard($_GET);
|
||||||
|
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
||||||
|
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$userUid = $_SESSION['USER_LOGGED'];
|
$userUid = $_SESSION['USER_LOGGED'];
|
||||||
$filters['paged'] = isset( $_REQUEST["paged"] ) ? $filter->sanitizeInputValue($_REQUEST["paged"], 'nosql') : true;
|
$filters['paged'] = isset( $_REQUEST["paged"] ) ? $filter->sanitizeInputValue($_REQUEST["paged"], 'nosql') : true;
|
||||||
|
|||||||
@@ -27,6 +27,26 @@
|
|||||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||||
* @date Jan 10th, 2010
|
* @date Jan 10th, 2010
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* verify user authentication, case tracker.
|
||||||
|
*/
|
||||||
|
if (!isset($_SESSION['PIN'])) {
|
||||||
|
global $RBAC;
|
||||||
|
switch ($RBAC->userCanAccess('PM_LOGIN')) {
|
||||||
|
case -2:
|
||||||
|
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
||||||
|
G::header('location: ../login/login');
|
||||||
|
die();
|
||||||
|
break;
|
||||||
|
case -1:
|
||||||
|
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||||
|
G::header('location: ../login/login');
|
||||||
|
die();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$action = $_REQUEST['action'];
|
$action = $_REQUEST['action'];
|
||||||
unset($_REQUEST['action']);
|
unset($_REQUEST['action']);
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
function wsBaseLogin ($username, $password)
|
|
||||||
{
|
|
||||||
G::LoadClass( 'wsBase' );
|
|
||||||
$ws = new wsBase();
|
|
||||||
$res = $ws->login( $username, $password );
|
|
||||||
return $res->getPayloadArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
function wsBaseProcessList ($studentName)
|
|
||||||
{
|
|
||||||
G::LoadClass( 'wsBase' );
|
|
||||||
$ws = new wsBase();
|
|
||||||
$result = $ws->processList();
|
|
||||||
//$result[] = array ( 'guid' => 'a' . $studentName , 'name' => 'bc' );
|
|
||||||
//$result[] = array ( 'guid' => '2a' , 'name' => '2bc' . $studentName );
|
|
||||||
//$result[] = array ( 'guid' => '2a' , 'name' => '2bc' . $studentName );
|
|
||||||
return array ("processes" => $result
|
|
||||||
);
|
|
||||||
//return array ( "status_code" => 12, "message" => 'abx', "timestamp" => 'aa' );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Map of the service operation "ExamResult" to php function "ExamResult" */
|
|
||||||
$operations = array ("processesList" => "wsBaseProcessList","login" => "wsBaseLogin"
|
|
||||||
);
|
|
||||||
|
|
||||||
/* just tell your function parameters should be in mixed format,
|
|
||||||
that is here parameter will be the string with the name in it*/
|
|
||||||
|
|
||||||
$opParams = array ("wsBaseProcessList" => "MIXED","wsBaseLogin" => "MIXED"
|
|
||||||
);
|
|
||||||
|
|
||||||
//$wsdl = PATH_METHODS . "services" . PATH_SEP . "pmos.wsdl";
|
|
||||||
$wsdl = "/home/fernando/processmaker/trunk/workflow/engine/methods/services/pmos.wsdl";
|
|
||||||
echo $wsdl;
|
|
||||||
echo file_get_contents( $wsdl );
|
|
||||||
die();
|
|
||||||
/* Created the WSService */
|
|
||||||
$svr = new WSService( array ("wsdl" => $wsdl,"operations" => $operations,"opParams" => $opParams
|
|
||||||
) );
|
|
||||||
|
|
||||||
/* Reply the client */
|
|
||||||
$svr->reply();
|
|
||||||
|
|
||||||
die();
|
|
||||||
|
|
||||||
@@ -128,324 +128,59 @@ switch ($_POST['action']) {
|
|||||||
print (G::json_encode($oData));
|
print (G::json_encode($oData));
|
||||||
break;
|
break;
|
||||||
case 'saveUser':
|
case 'saveUser':
|
||||||
|
case 'savePersonalInfo':
|
||||||
try {
|
try {
|
||||||
|
$user = new \ProcessMaker\BusinessModel\User();
|
||||||
$form = $_POST;
|
$form = $_POST;
|
||||||
|
|
||||||
if (isset($_POST['USR_UID'])) {
|
switch ($_POST['action']) {
|
||||||
$form['USR_UID'] = $_POST['USR_UID'];
|
case 'saveUser';
|
||||||
} else {
|
if (!$user->checkPermission($_SESSION['USER_LOGGED'], 'PM_USERS')) {
|
||||||
$form['USR_UID'] = '';
|
throw new Exception(G::LoadTranslation('ID_USER_NOT_HAVE_PERMISSION', [$_SESSION['USER_LOGGED']]));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'savePersonalInfo':
|
||||||
|
if (!$user->checkPermission($_SESSION['USER_LOGGED'], 'PM_USERS') &&
|
||||||
|
!$user->checkPermission($_SESSION['USER_LOGGED'], 'PM_EDITPERSONALINFO')
|
||||||
|
) {
|
||||||
|
throw new Exception(G::LoadTranslation('ID_USER_NOT_HAVE_PERMISSION', [$_SESSION['USER_LOGGED']]));
|
||||||
|
}
|
||||||
|
|
||||||
|
unset(
|
||||||
|
$form['USR_REPLACED_BY'],
|
||||||
|
$form['USR_DUE_DATE'],
|
||||||
|
$form['USR_STATUS'],
|
||||||
|
$form['USR_ROLE']
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new Exception(G::LoadTranslation('ID_INVALID_DATA'));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($form['USR_NEW_PASS'])) {
|
if (array_key_exists('USR_LOGGED_NEXT_TIME', $form)) {
|
||||||
$form['USR_NEW_PASS'] = '';
|
$form['USR_LOGGED_NEXT_TIME'] = ($form['USR_LOGGED_NEXT_TIME'])? 1 : 0;
|
||||||
}
|
|
||||||
if ($form['USR_NEW_PASS'] != '') {
|
|
||||||
$form['USR_PASSWORD'] = Bootstrap::hashPassword($form['USR_NEW_PASS']);
|
|
||||||
}
|
|
||||||
if (!isset($form['USR_CITY'])) {
|
|
||||||
$form['USR_CITY'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($form['USR_LOCATION'])) {
|
|
||||||
$form['USR_LOCATION'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($form['USR_AUTH_USER_DN'])) {
|
|
||||||
$form['USR_AUTH_USER_DN'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($form['USR_LOGGED_NEXT_TIME'])) {
|
|
||||||
$form['USR_LOGGED_NEXT_TIME'] = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = new \ProcessMaker\BusinessModel\User();
|
$userUid = '';
|
||||||
|
|
||||||
$firstName = $form['USR_FIRSTNAME'] ? " - First Name: ". $form['USR_FIRSTNAME'] : "";
|
|
||||||
$lastName = $form['USR_LASTNAME'] ? " - Last Name: ". $form['USR_LASTNAME'] : "";
|
|
||||||
$email = $form['USR_EMAIL'] ? " - Email: ". $form['USR_EMAIL'] : "";
|
|
||||||
$dueDate = $form['USR_DUE_DATE'] ? " - Due Date: ". $form['USR_DUE_DATE'] : "";
|
|
||||||
$status = "";
|
|
||||||
if(isset($form['USR_STATUS'])){
|
|
||||||
$status = $form['USR_STATUS'] ? " - Status: ". $form['USR_STATUS'] : "";
|
|
||||||
}
|
|
||||||
$address = $form['USR_ADDRESS'] ? " - Address: ". $form['USR_ADDRESS'] : "";
|
|
||||||
$phone = $form['USR_PHONE'] ? " - Phone: ". $form['USR_PHONE'] : "";
|
|
||||||
$zipCode = $form['USR_ZIP_CODE'] ? " - Zip Code: ". $form['USR_ZIP_CODE'] : "";
|
|
||||||
$position = $form['USR_POSITION'] ? " - Position: ". $form['USR_POSITION'] : "";
|
|
||||||
$role = $form['USR_ROLE'] ? " - Role: ". $form['USR_ROLE'] : "";
|
|
||||||
$languageDef = (isset($form['USR_DEFAULT_LANG']))? " - Default Language: " . $form['USR_DEFAULT_LANG'] : "";
|
|
||||||
/*----------------------------------********---------------------------------*/
|
|
||||||
$costByHour = $form['USR_COST_BY_HOUR'] ? $form['USR_COST_BY_HOUR'] : "";
|
|
||||||
$unit = $form['USR_UNIT_COST'] ? $form['USR_UNIT_COST'] : "";
|
|
||||||
/*----------------------------------********---------------------------------*/
|
|
||||||
$timeZone = (isset($form['USR_TIME_ZONE']))? ' - Time Zone: ' . $form['USR_TIME_ZONE'] : '';
|
|
||||||
|
|
||||||
if ($form['USR_UID'] == '') {
|
if ($form['USR_UID'] == '') {
|
||||||
$criteria = new Criteria();
|
$arrayUserData = $user->create($form);
|
||||||
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
$userUid = $arrayUserData['USR_UID'];
|
||||||
$criteria->add(UsersPeer::USR_USERNAME, utf8_encode($_POST['USR_USERNAME']));
|
|
||||||
if (UsersPeer::doCount($criteria) > 0) {
|
|
||||||
throw new Exception(G::LoadTranslation('ID_USERNAME_ALREADY_EXISTS', array('USER_ID' => $_POST['USR_USERNAME'])));
|
|
||||||
}
|
|
||||||
$aData['USR_USERNAME'] = $form['USR_USERNAME'];
|
|
||||||
$aData['USR_PASSWORD'] = $form['USR_PASSWORD'];
|
|
||||||
$aData['USR_FIRSTNAME'] = $form['USR_FIRSTNAME'];
|
|
||||||
$aData['USR_LASTNAME'] = $form['USR_LASTNAME'];
|
|
||||||
$aData['USR_EMAIL'] = $form['USR_EMAIL'];
|
|
||||||
$aData['USR_DUE_DATE'] = $form['USR_DUE_DATE'];
|
|
||||||
$aData['USR_CREATE_DATE'] = date('Y-m-d H:i:s');
|
|
||||||
$aData['USR_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
|
||||||
$aData['USR_BIRTHDAY'] = date('Y-m-d');
|
|
||||||
$aData['USR_AUTH_USER_DN'] = $form['USR_AUTH_USER_DN'];
|
|
||||||
|
|
||||||
//fixing bug in inactive user when the admin create a new user.
|
$user->auditLog('INS', array_merge(['USR_UID' => $userUid, 'USR_USERNAME' => $arrayUserData['USR_USERNAME']], $form));
|
||||||
$statusWF = $form['USR_STATUS'];
|
|
||||||
$aData['USR_STATUS'] = $form['USR_STATUS'] ;//== 'ACTIVE' ? 1 : 0;
|
|
||||||
try {
|
|
||||||
$sUserUID = $RBAC->createUser($aData, $form['USR_ROLE']);
|
|
||||||
} catch(Exception $oError) {
|
|
||||||
throw new Exception($oError->getMessage());
|
|
||||||
}
|
|
||||||
$aData['USR_STATUS'] = $statusWF;
|
|
||||||
$aData['USR_UID'] = $sUserUID;
|
|
||||||
$aData['USR_PASSWORD'] = G::encryptOld($sUserUID); //fake :p
|
|
||||||
$aData['USR_COUNTRY'] = $form['USR_COUNTRY'];
|
|
||||||
$aData['USR_CITY'] = $form['USR_CITY'];
|
|
||||||
$aData['USR_LOCATION'] = $form['USR_LOCATION'];
|
|
||||||
$aData['USR_ADDRESS'] = $form['USR_ADDRESS'];
|
|
||||||
$aData['USR_PHONE'] = $form['USR_PHONE'];
|
|
||||||
$aData['USR_ZIP_CODE'] = $form['USR_ZIP_CODE'];
|
|
||||||
$aData['USR_POSITION'] = $form['USR_POSITION'];
|
|
||||||
// $aData['USR_RESUME'] = $form['USR_RESUME'];
|
|
||||||
$aData['USR_ROLE'] = $form['USR_ROLE'];
|
|
||||||
$aData['USR_DEFAULT_LANG'] = (isset($form['USR_DEFAULT_LANG']))? $form['USR_DEFAULT_LANG'] : '';
|
|
||||||
/*----------------------------------********---------------------------------*/
|
|
||||||
$aData['USR_COST_BY_HOUR'] = $form['USR_COST_BY_HOUR'];
|
|
||||||
$aData['USR_UNIT_COST'] = $form['USR_UNIT_COST'];
|
|
||||||
/*----------------------------------********---------------------------------*/
|
|
||||||
$aData['USR_REPLACED_BY'] = ($user->getUserRecordByPk($form['USR_REPLACED_BY'], [], false) !== false)?
|
|
||||||
$form['USR_REPLACED_BY'] : '';
|
|
||||||
$aData['USR_TIME_ZONE'] = $form['USR_TIME_ZONE'];
|
|
||||||
|
|
||||||
require_once 'classes/model/Users.php';
|
|
||||||
$oUser = new Users();
|
|
||||||
$oUser->create($aData);
|
|
||||||
G::auditLog('CreateUser', 'User Name: ' . $aData['USR_USERNAME'] . ' - User ID: (' . $aData['USR_UID'] . ') ' . $firstName . $lastName . $email . $dueDate . $status . $address . $phone . $zipCode . $position . $role . $timeZone . $languageDef);
|
|
||||||
|
|
||||||
if ($_FILES['USR_PHOTO']['error'] != 1) {
|
|
||||||
//print (PATH_IMAGES_ENVIRONMENT_USERS);
|
|
||||||
if ($_FILES['USR_PHOTO']['tmp_name'] != '') {
|
|
||||||
G::uploadFile($_FILES['USR_PHOTO']['tmp_name'], PATH_IMAGES_ENVIRONMENT_USERS, $sUserUID . '.gif');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$result->success = false;
|
|
||||||
$result->fileError = true;
|
|
||||||
print (G::json_encode($result));
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
if ($_FILES['USR_RESUME']['error'] != 1) {
|
|
||||||
if ($_FILES['USR_RESUME']['tmp_name'] != '') {
|
|
||||||
G::uploadFile($_FILES['USR_RESUME']['tmp_name'], PATH_IMAGES_ENVIRONMENT_FILES . $sUserUID . '/', $_FILES['USR_RESUME']['name']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$result->success = false;
|
|
||||||
$result->fileError = true;
|
|
||||||
print(G::json_encode($result));
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
require_once 'classes/model/UsersProperties.php';
|
|
||||||
$oUserProperty = new UsersProperties();
|
|
||||||
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aData['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(Bootstrap::hashPassword($aData['USR_PASSWORD'])))));
|
|
||||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
|
|
||||||
$oUserProperty->update($aUserProperty);
|
|
||||||
} else {
|
} else {
|
||||||
|
if (array_key_exists('USR_NEW_PASS', $form) && $form['USR_NEW_PASS'] == '') {
|
||||||
$aData['USR_UID'] = $form['USR_UID'];
|
unset($form['USR_NEW_PASS']);
|
||||||
$aData['USR_USERNAME'] = $form['USR_USERNAME'];
|
|
||||||
|
|
||||||
if (isset($form['USR_PASSWORD'])) {
|
|
||||||
|
|
||||||
if ($form['USR_PASSWORD'] != '') {
|
|
||||||
$aData['USR_PASSWORD'] = $form['USR_PASSWORD'];
|
|
||||||
require_once 'classes/model/UsersProperties.php';
|
|
||||||
$oUserProperty = new UsersProperties();
|
|
||||||
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($form['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(Bootstrap::hashPassword($form['USR_PASSWORD'])))));
|
|
||||||
|
|
||||||
$memKey = 'rbacSession' . session_id();
|
|
||||||
$memcache = & PMmemcached::getSingleton(defined('SYS_SYS') ? SYS_SYS : '' );
|
|
||||||
if (($RBAC->aUserInfo = $memcache->get($memKey)) === false) {
|
|
||||||
$RBAC->loadUserRolePermission($RBAC->sSystem, $_SESSION['USER_LOGGED']);
|
|
||||||
$memcache->set($memKey, $RBAC->aUserInfo, PMmemcached::EIGHT_HOURS);
|
|
||||||
}
|
|
||||||
if ($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'] == 'PROCESSMAKER_ADMIN') {
|
|
||||||
$aUserProperty['USR_LAST_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
|
||||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
|
|
||||||
$oUserProperty->update($aUserProperty);
|
|
||||||
}
|
|
||||||
|
|
||||||
$aErrors = $oUserProperty->validatePassword($form['USR_NEW_PASS'], $aUserProperty['USR_LAST_UPDATE_DATE'], 0);
|
|
||||||
|
|
||||||
if (count($aErrors) > 0) {
|
|
||||||
$sDescription = G::LoadTranslation('ID_POLICY_ALERT') . ':,';
|
|
||||||
foreach ($aErrors as $sError) {
|
|
||||||
switch ($sError) {
|
|
||||||
case 'ID_PPP_MINIMUN_LENGTH':
|
|
||||||
$sDescription .= ' - ' . G::LoadTranslation($sError) . ': ' . PPP_MINIMUN_LENGTH . ',';
|
|
||||||
break;
|
|
||||||
case 'ID_PPP_MAXIMUN_LENGTH':
|
|
||||||
$sDescription .= ' - ' . G::LoadTranslation($sError) . ': ' . PPP_MAXIMUN_LENGTH . ',';
|
|
||||||
break;
|
|
||||||
case 'ID_PPP_EXPIRATION_IN':
|
|
||||||
$sDescription .= ' - ' . G::LoadTranslation($sError) . ' ' . PPP_EXPIRATION_IN . ' ' . G::LoadTranslation('ID_DAYS') . ',';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$sDescription .= ' - ' . G::LoadTranslation($sError) . ',';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$sDescription .= '' . G::LoadTranslation('ID_PLEASE_CHANGE_PASSWORD_POLICY');
|
|
||||||
$result->success = false;
|
|
||||||
$result->msg = $sDescription;
|
|
||||||
print (G::json_encode($result));
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
$aHistory = unserialize($aUserProperty['USR_PASSWORD_HISTORY']);
|
|
||||||
if (!is_array($aHistory)) {
|
|
||||||
$aHistory = array();
|
|
||||||
}
|
|
||||||
if (!defined('PPP_PASSWORD_HISTORY')) {
|
|
||||||
define('PPP_PASSWORD_HISTORY', 0);
|
|
||||||
}
|
|
||||||
if (PPP_PASSWORD_HISTORY > 0) {
|
|
||||||
//it's looking a password igual into aHistory array that was send for post in md5 way
|
|
||||||
$c = 0;
|
|
||||||
$sw = 1;
|
|
||||||
while (count($aHistory) >= 1 && count($aHistory) > $c && $sw) {
|
|
||||||
if (strcmp(trim($aHistory[$c]), trim($form['USR_PASSWORD'])) == 0) {
|
|
||||||
$sw = 0;
|
|
||||||
}
|
|
||||||
$c++;
|
|
||||||
}
|
|
||||||
if ($sw == 0) {
|
|
||||||
$sDescription = G::LoadTranslation('ID_POLICY_ALERT') . ':<br /><br />';
|
|
||||||
$sDescription .= ' - ' . G::LoadTranslation('PASSWORD_HISTORY') . ': ' . PPP_PASSWORD_HISTORY . '<br />';
|
|
||||||
$sDescription .= '<br />' . G::LoadTranslation('ID_PLEASE_CHANGE_PASSWORD_POLICY') . '';
|
|
||||||
$result->success = false;
|
|
||||||
$result->msg = $sDescription;
|
|
||||||
print (G::json_encode($result));
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count($aHistory) >= PPP_PASSWORD_HISTORY) {
|
|
||||||
$sLastPassw = array_shift($aHistory);
|
|
||||||
}
|
|
||||||
$aHistory[] = $form['USR_PASSWORD'];
|
|
||||||
}
|
|
||||||
$aUserProperty['USR_LAST_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
|
||||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
|
|
||||||
$aUserProperty['USR_PASSWORD_HISTORY'] = serialize($aHistory);
|
|
||||||
$oUserProperty->update($aUserProperty);
|
|
||||||
} else {
|
|
||||||
require_once 'classes/model/Users.php';
|
|
||||||
$oUser = new Users();
|
|
||||||
$aUser = $oUser->load($aData['USR_UID']);
|
|
||||||
require_once 'classes/model/UsersProperties.php';
|
|
||||||
$oUserProperty = new UsersProperties();
|
|
||||||
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aData['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array($aUser['USR_PASSWORD']))));
|
|
||||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
|
|
||||||
$oUserProperty->update($aUserProperty);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
require_once 'classes/model/Users.php';
|
|
||||||
$oUser = new Users();
|
|
||||||
$aUser = $oUser->load($aData['USR_UID']);
|
|
||||||
require_once 'classes/model/UsersProperties.php';
|
|
||||||
$oUserProperty = new UsersProperties();
|
|
||||||
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aData['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array($aUser['USR_PASSWORD']))));
|
|
||||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
|
|
||||||
$oUserProperty->update($aUserProperty);
|
|
||||||
}
|
|
||||||
$aData['USR_FIRSTNAME'] = $form['USR_FIRSTNAME'];
|
|
||||||
$aData['USR_LASTNAME'] = $form['USR_LASTNAME'];
|
|
||||||
$aData['USR_EMAIL'] = $form['USR_EMAIL'];
|
|
||||||
$aData['USR_DUE_DATE'] = $form['USR_DUE_DATE'];
|
|
||||||
$aData['USR_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
|
||||||
if (isset($form['USR_STATUS'])) {
|
|
||||||
$aData['USR_STATUS'] = $form['USR_STATUS'];
|
|
||||||
}
|
|
||||||
if (isset($form['USR_ROLE'])) {
|
|
||||||
$RBAC->updateUser($aData, $form['USR_ROLE']);
|
|
||||||
} else {
|
|
||||||
$RBAC->updateUser($aData);
|
|
||||||
}
|
|
||||||
$aData['USR_COUNTRY'] = $form['USR_COUNTRY'];
|
|
||||||
$aData['USR_CITY'] = $form['USR_CITY'];
|
|
||||||
$aData['USR_LOCATION'] = $form['USR_LOCATION'];
|
|
||||||
$aData['USR_ADDRESS'] = $form['USR_ADDRESS'];
|
|
||||||
$aData['USR_PHONE'] = $form['USR_PHONE'];
|
|
||||||
$aData['USR_ZIP_CODE'] = $form['USR_ZIP_CODE'];
|
|
||||||
$aData['USR_POSITION'] = $form['USR_POSITION'];
|
|
||||||
/*
|
|
||||||
if ($form['USR_RESUME'] != '') {
|
|
||||||
$aData['USR_RESUME'] = $form['USR_RESUME'];
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (isset($form['USR_ROLE'])) {
|
|
||||||
$aData['USR_ROLE'] = $form['USR_ROLE'];
|
|
||||||
}
|
|
||||||
if (isset($form['USR_DEFAULT_LANG'])) {
|
|
||||||
$aData['USR_DEFAULT_LANG'] = $form['USR_DEFAULT_LANG'];
|
|
||||||
}
|
|
||||||
/*----------------------------------********---------------------------------*/
|
|
||||||
if (isset($form['USR_COST_BY_HOUR'])) {
|
|
||||||
$aData['USR_COST_BY_HOUR'] = $form['USR_COST_BY_HOUR'];
|
|
||||||
}
|
|
||||||
if (isset($form['USR_UNIT_COST'])) {
|
|
||||||
$aData['USR_UNIT_COST'] = $form['USR_UNIT_COST'];
|
|
||||||
}
|
|
||||||
/*----------------------------------********---------------------------------*/
|
|
||||||
if (isset($form['USR_REPLACED_BY'])) {
|
|
||||||
$aData['USR_REPLACED_BY'] = ($user->getUserRecordByPk($form['USR_REPLACED_BY'], [], false) !== false)?
|
|
||||||
$form['USR_REPLACED_BY'] : '';
|
|
||||||
}
|
|
||||||
if (isset($form['USR_AUTH_USER_DN'])) {
|
|
||||||
$aData['USR_AUTH_USER_DN'] = $form['USR_AUTH_USER_DN'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($form['USR_TIME_ZONE'])) {
|
$result = $user->update($form['USR_UID'], $form, $_SESSION['USER_LOGGED']);
|
||||||
$aData['USR_TIME_ZONE'] = $form['USR_TIME_ZONE'];
|
$userUid = $form['USR_UID'];
|
||||||
}
|
|
||||||
|
$arrayUserData = $user->getUserRecordByPk($userUid, [], false);
|
||||||
|
|
||||||
|
$user->auditLog('UPD', array_merge(['USR_UID' => $userUid, 'USR_USERNAME' => $arrayUserData['USR_USERNAME']], $form));
|
||||||
|
|
||||||
require_once 'classes/model/Users.php';
|
|
||||||
$oUser = new Users();
|
|
||||||
$oUser->update($aData);
|
|
||||||
G::auditLog('UpdateUser', 'User Name: ' . $aData['USR_USERNAME'] . ' - User ID: (' . $aData['USR_UID'] . ') ' . $firstName . $lastName . $email . $dueDate . $status . $address . $phone . $zipCode . $position . $role . $timeZone . $languageDef);
|
|
||||||
if ($_FILES['USR_PHOTO']['error'] != 1) {
|
|
||||||
if ($_FILES['USR_PHOTO']['tmp_name'] != '') {
|
|
||||||
$aAux = explode('.', $_FILES['USR_PHOTO']['name']);
|
|
||||||
G::uploadFile($_FILES['USR_PHOTO']['tmp_name'], PATH_IMAGES_ENVIRONMENT_USERS, $aData['USR_UID'] . '.' . $aAux[1]);
|
|
||||||
G::resizeImage(PATH_IMAGES_ENVIRONMENT_USERS . $aData['USR_UID'] . '.' . $aAux[1], 96, 96, PATH_IMAGES_ENVIRONMENT_USERS . $aData['USR_UID'] . '.gif');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$result->success = false;
|
|
||||||
$result->fileError = true;
|
|
||||||
print (G::json_encode($result));
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
if ($_FILES['USR_RESUME']['error'] != 1) {
|
|
||||||
if ($_FILES['USR_RESUME']['tmp_name'] != '') {
|
|
||||||
G::uploadFile($_FILES['USR_RESUME']['tmp_name'], PATH_IMAGES_ENVIRONMENT_FILES . $aData['USR_UID'] . '/', $_FILES['USR_RESUME']['name']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$result->success = false;
|
|
||||||
$result->fileError = true;
|
|
||||||
print(G::json_encode($result));
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/* Saving preferences */
|
/* Saving preferences */
|
||||||
$def_lang = $form['PREF_DEFAULT_LANG'];
|
$def_lang = $form['PREF_DEFAULT_LANG'];
|
||||||
$def_menu = $form['PREF_DEFAULT_MENUSELECTED'];
|
$def_menu = $form['PREF_DEFAULT_MENUSELECTED'];
|
||||||
@@ -456,31 +191,32 @@ switch ($_POST['action']) {
|
|||||||
$oConf = new Configurations();
|
$oConf = new Configurations();
|
||||||
$aConf = Array('DEFAULT_LANG' => $def_lang, 'DEFAULT_MENU' => $def_menu, 'DEFAULT_CASES_MENU' => $def_cases_menu);
|
$aConf = Array('DEFAULT_LANG' => $def_lang, 'DEFAULT_MENU' => $def_menu, 'DEFAULT_CASES_MENU' => $def_cases_menu);
|
||||||
|
|
||||||
/* UPDATING SESSION VARIABLES */
|
|
||||||
$aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']);
|
|
||||||
//$_SESSION['USR_FULLNAME'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
|
||||||
|
|
||||||
|
|
||||||
$oConf->aConfig = $aConf;
|
$oConf->aConfig = $aConf;
|
||||||
$oConf->saveConfig('USER_PREFERENCES', '', '', $_SESSION['USER_LOGGED']);
|
$oConf->saveConfig('USER_PREFERENCES', '', '', $_SESSION['USER_LOGGED']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$user->uploadImage($userUid);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$result = new stdClass();
|
||||||
|
$result->success = false;
|
||||||
|
$result->fileError = true;
|
||||||
|
|
||||||
|
echo G::json_encode($result);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
if ($_SESSION['USER_LOGGED'] == $form['USR_UID']) {
|
if ($_SESSION['USER_LOGGED'] == $form['USR_UID']) {
|
||||||
/* UPDATING SESSION VARIABLES */
|
/* UPDATING SESSION VARIABLES */
|
||||||
$aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']);
|
$aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']);
|
||||||
$_SESSION['USR_FULLNAME'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
$_SESSION['USR_FULLNAME'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//Save Calendar assigment
|
$result = new stdClass();
|
||||||
if ((isset($form['USR_CALENDAR']))) {
|
|
||||||
//Save Calendar ID for this user
|
|
||||||
G::LoadClass("calendar");
|
|
||||||
$calendarObj = new Calendar();
|
|
||||||
$calendarObj->assignCalendarTo($aData['USR_UID'], $form['USR_CALENDAR'], 'USER');
|
|
||||||
}
|
|
||||||
$result->success = true;
|
$result->success = true;
|
||||||
print (G::json_encode($result));
|
print (G::json_encode($result));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
$result = new stdClass();
|
||||||
$result->success = false;
|
$result->success = false;
|
||||||
$result->error = $e->getMessage();
|
$result->error = $e->getMessage();
|
||||||
print (G::json_encode($result));
|
print (G::json_encode($result));
|
||||||
@@ -597,6 +333,10 @@ switch ($_POST['action']) {
|
|||||||
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aFields['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array($aFields['USR_PASSWORD']))));
|
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aFields['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array($aFields['USR_PASSWORD']))));
|
||||||
$aFields['USR_LOGGED_NEXT_TIME'] = $aUserProperty['USR_LOGGED_NEXT_TIME'];
|
$aFields['USR_LOGGED_NEXT_TIME'] = $aUserProperty['USR_LOGGED_NEXT_TIME'];
|
||||||
|
|
||||||
|
if(array_key_exists('USR_PASSWORD', $aFields)) {
|
||||||
|
unset($aFields['USR_PASSWORD']);
|
||||||
|
}
|
||||||
|
|
||||||
$result->success = true;
|
$result->success = true;
|
||||||
$result->user = $aFields;
|
$result->user = $aFields;
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ $oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [
|
|||||||
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
||||||
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
|
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
|
||||||
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
||||||
|
$oHeadPublisher->assign('__ACTION__', 'saveUser');
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|
||||||
|
|||||||
@@ -63,5 +63,6 @@ $oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [
|
|||||||
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
||||||
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
|
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
|
||||||
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
||||||
|
$oHeadPublisher->assign('__ACTION__', 'savePersonalInfo');
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ $oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [
|
|||||||
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
||||||
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
|
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
|
||||||
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
||||||
|
$oHeadPublisher->assign('__ACTION__', 'saveUser');
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|
||||||
|
|||||||
@@ -497,7 +497,7 @@ try {
|
|||||||
$row['USR_ROLE'] = isset($uRole['ROL_NAME']) ? ($uRole['ROL_NAME'] != '' ? $uRole['ROL_NAME'] : $uRole['ROL_CODE']) : $uRole['ROL_CODE'];
|
$row['USR_ROLE'] = isset($uRole['ROL_NAME']) ? ($uRole['ROL_NAME'] != '' ? $uRole['ROL_NAME'] : $uRole['ROL_CODE']) : $uRole['ROL_CODE'];
|
||||||
|
|
||||||
$row['DUE_DATE_OK'] = (date('Y-m-d') > date('Y-m-d', strtotime($row['USR_DUE_DATE']))) ? 0 : 1;
|
$row['DUE_DATE_OK'] = (date('Y-m-d') > date('Y-m-d', strtotime($row['USR_DUE_DATE']))) ? 0 : 1;
|
||||||
$row['LAST_LOGIN'] = isset($aLogin[$row['USR_UID']]) ? $aLogin[$row['USR_UID']] : '';
|
$row['LAST_LOGIN'] = isset($aLogin[$row['USR_UID']]) ? \ProcessMaker\Util\DateTime::convertUtcToTimeZone($aLogin[$row['USR_UID']]) : '';
|
||||||
$row['TOTAL_CASES'] = isset($row['USR_TOTAL_PARTICIPATED']) ? $row['USR_TOTAL_PARTICIPATED'] : 0;
|
$row['TOTAL_CASES'] = isset($row['USR_TOTAL_PARTICIPATED']) ? $row['USR_TOTAL_PARTICIPATED'] : 0;
|
||||||
$row['DEP_TITLE'] = isset($aDepart[$row['USR_UID']]) ? $aDepart[$row['USR_UID']] : '';
|
$row['DEP_TITLE'] = isset($aDepart[$row['USR_UID']]) ? $aDepart[$row['USR_UID']] : '';
|
||||||
$row['USR_UX'] = isset($uxList[$row['USR_UX']]) ? $uxList[$row['USR_UX']] : $uxList['NORMAL'];
|
$row['USR_UX'] = isset($uxList[$row['USR_UX']]) ? $uxList[$row['USR_UX']] : $uxList['NORMAL'];
|
||||||
@@ -586,4 +586,3 @@ try {
|
|||||||
} catch (Exception $oException) {
|
} catch (Exception $oException) {
|
||||||
die($oException->getMessage());
|
die($oException->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -493,7 +493,7 @@ class InputDocument
|
|||||||
*
|
*
|
||||||
* return array Return an array with data of an InputDocument
|
* return array Return an array with data of an InputDocument
|
||||||
*/
|
*/
|
||||||
public function addCasesInputDocument($applicationUid, $taskUid, $appDocComment, $inputDocumentUid, $userUid)
|
public function addCasesInputDocument($applicationUid, $taskUid, $appDocComment, $inputDocumentUid, $userUid, $runningWorkflow = true)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ((isset( $_FILES['form'] )) && ($_FILES['form']['error'] != 0)) {
|
if ((isset( $_FILES['form'] )) && ($_FILES['form']['error'] != 0)) {
|
||||||
@@ -535,7 +535,60 @@ class InputDocument
|
|||||||
$appDocType = 'INPUT';
|
$appDocType = 'INPUT';
|
||||||
$case = new \Cases();
|
$case = new \Cases();
|
||||||
$delIndex = \AppDelegation::getCurrentIndex($applicationUid);
|
$delIndex = \AppDelegation::getCurrentIndex($applicationUid);
|
||||||
$case->thisIsTheCurrentUser($applicationUid, $delIndex, $userUid, "REDIRECT", "casesListExtJs");
|
|
||||||
|
if ($runningWorkflow) {
|
||||||
|
$case->thisIsTheCurrentUser($applicationUid, $delIndex, $userUid, 'REDIRECT', 'casesListExtJs');
|
||||||
|
} else {
|
||||||
|
$criteria = new \Criteria('workflow');
|
||||||
|
|
||||||
|
$criteria->add(\AppDelegationPeer::APP_UID, $applicationUid);
|
||||||
|
$criteria->add(\AppDelegationPeer::DEL_INDEX, $delIndex);
|
||||||
|
$criteria->add(\AppDelegationPeer::USR_UID, $userUid);
|
||||||
|
|
||||||
|
$rsCriteria = \ProcessUserPeer::doSelectRS($criteria);
|
||||||
|
|
||||||
|
if (!$rsCriteria->next()) {
|
||||||
|
$case2 = new \ProcessMaker\BusinessModel\Cases();
|
||||||
|
|
||||||
|
$arrayApplicationData = $case2->getApplicationRecordByPk($applicationUid, [], false);
|
||||||
|
|
||||||
|
$msg = '';
|
||||||
|
|
||||||
|
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
|
||||||
|
$flagps = $supervisor->isUserProcessSupervisor($arrayApplicationData['PRO_UID'], $userUid);
|
||||||
|
|
||||||
|
if ($flagps == false) {
|
||||||
|
$msg = \G::LoadTranslation('ID_USER_NOT_IT_BELONGS_CASE_OR_NOT_SUPERVISOR');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($msg == '') {
|
||||||
|
$criteria = new \Criteria('workflow');
|
||||||
|
|
||||||
|
$criteria->add(\StepSupervisorPeer::PRO_UID, $arrayApplicationData['PRO_UID'], \Criteria::EQUAL);
|
||||||
|
$criteria->add(\StepSupervisorPeer::STEP_TYPE_OBJ, 'INPUT_DOCUMENT', \Criteria::EQUAL);
|
||||||
|
$criteria->add(\StepSupervisorPeer::STEP_UID_OBJ, $inputDocumentUid, \Criteria::EQUAL);
|
||||||
|
|
||||||
|
$rsCriteria = \StepSupervisorPeer::doSelectRS($criteria);
|
||||||
|
|
||||||
|
if (!$rsCriteria->next()) {
|
||||||
|
$msg = \G::LoadTranslation('ID_USER_IS_SUPERVISOR_DOES_NOT_ASSOCIATED_INPUT_DOCUMENT');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($msg != '') {
|
||||||
|
if ($runningWorkflow) {
|
||||||
|
\G::SendMessageText($msg, 'ERROR');
|
||||||
|
$backUrlObj = explode('sys' . SYS_SYS, $_SERVER['HTTP_REFERER']);
|
||||||
|
|
||||||
|
\G::header('location: ' . '/sys' . SYS_SYS . $backUrlObj[1]);
|
||||||
|
exit(0);
|
||||||
|
} else {
|
||||||
|
throw new \Exception($msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Load the fields
|
//Load the fields
|
||||||
$arrayField = $case->loadCase($applicationUid);
|
$arrayField = $case->loadCase($applicationUid);
|
||||||
$arrayField["APP_DATA"] = array_merge($arrayField["APP_DATA"], \G::getSystemConstants());
|
$arrayField["APP_DATA"] = array_merge($arrayField["APP_DATA"], \G::getSystemConstants());
|
||||||
|
|||||||
@@ -1511,5 +1511,57 @@ class ProcessSupervisor
|
|||||||
$oCriteria->setStepPosition($pos);
|
$oCriteria->setStepPosition($pos);
|
||||||
$oCriteria->save();
|
$oCriteria->save();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate if the user is supervisor of the process
|
||||||
|
*
|
||||||
|
* @param string $projectUid Unique id of process
|
||||||
|
* @param string $userUid Unique id of User
|
||||||
|
*
|
||||||
|
* @return bool Return
|
||||||
|
*/
|
||||||
|
public function isUserProcessSupervisor($projectUid, $userUid)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$criteria = new \Criteria('workflow');
|
||||||
|
|
||||||
|
$criteria->add(\ProcessUserPeer::USR_UID, $userUid, \Criteria::EQUAL);
|
||||||
|
$criteria->add(\ProcessUserPeer::PRO_UID, $projectUid, \Criteria::EQUAL);
|
||||||
|
$criteria->add(\ProcessUserPeer::PU_TYPE, 'SUPERVISOR', \Criteria::EQUAL);
|
||||||
|
|
||||||
|
$rsCriteria = \ProcessUserPeer::doSelectRS($criteria);
|
||||||
|
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
|
if ($rsCriteria->next()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$criteria = new \Criteria('workflow');
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(\ProcessUserPeer::USR_UID);
|
||||||
|
|
||||||
|
$criteria->add(\ProcessUserPeer::PRO_UID, $projectUid, \Criteria::EQUAL);
|
||||||
|
$criteria->add(\ProcessUserPeer::PU_TYPE, 'GROUP_SUPERVISOR', \Criteria::EQUAL);
|
||||||
|
|
||||||
|
$rsCriteria = \ProcessUserPeer::doSelectRS($criteria);
|
||||||
|
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
|
while ($rsCriteria->next()) {
|
||||||
|
$record = $rsCriteria->getRow();
|
||||||
|
|
||||||
|
$groupUid = $record['USR_UID'];
|
||||||
|
|
||||||
|
$obj = \GroupUserPeer::retrieveByPK($groupUid, $userUid);
|
||||||
|
|
||||||
|
if (!is_null($obj)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Return
|
||||||
|
return false;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -348,11 +348,45 @@ class ReportTable
|
|||||||
$result = new \stdClass();
|
$result = new \stdClass();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
$additionalTableUid = $arrayData['REP_TAB_UID'];
|
||||||
|
$flagNew = 0;
|
||||||
|
|
||||||
|
$additionalTables = \AdditionalTablesPeer::retrieveByPK($arrayData['REP_TAB_UID']);
|
||||||
|
|
||||||
|
if (!is_null($additionalTables)){
|
||||||
|
$arrayData['REP_TAB_NAME'] = 'PMT_' . trim($arrayData['REP_TAB_NAME']);
|
||||||
|
|
||||||
|
if ($additionalTables->getAddTabName() != $arrayData['REP_TAB_NAME']) {
|
||||||
|
$arrayData['REP_TAB_UID'] = '';
|
||||||
|
$flagNew = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$arrayData['PRO_UID'] = trim($arrayData['PRO_UID']);
|
$arrayData['PRO_UID'] = trim($arrayData['PRO_UID']);
|
||||||
$arrayData['columns'] = \G::json_decode(stripslashes($arrayData['columns'])); //Decofing data columns
|
$arrayData['columns'] = \G::json_decode(stripslashes($arrayData['columns'])); //Decofing data columns
|
||||||
|
|
||||||
|
if ($flagNew == 1) {
|
||||||
|
$arrayNewColumn = [];
|
||||||
|
$counter = 0;
|
||||||
|
|
||||||
|
foreach ($arrayData['columns'] as $value) {
|
||||||
|
$column = $value;
|
||||||
|
|
||||||
|
if (!preg_match('/^(?:APP_UID|APP_NUMBER|APP_STATUS|ROW)$/', $column->field_name)) {
|
||||||
|
$column->uid = '';
|
||||||
|
$column->_index = $counter;
|
||||||
|
|
||||||
|
$arrayNewColumn[] = $column;
|
||||||
|
|
||||||
|
$counter++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$arrayData['columns'] = $arrayNewColumn;
|
||||||
|
}
|
||||||
|
|
||||||
$additionalTable = new \AdditionalTables();
|
$additionalTable = new \AdditionalTables();
|
||||||
|
|
||||||
$repTabClassName = $additionalTable->getPHPName($arrayData['REP_TAB_NAME']);
|
$repTabClassName = $additionalTable->getPHPName($arrayData['REP_TAB_NAME']);
|
||||||
@@ -531,6 +565,18 @@ class ReportTable
|
|||||||
|
|
||||||
$result->success = true;
|
$result->success = true;
|
||||||
$result->message = $result->msg = $buildResult;
|
$result->message = $result->msg = $buildResult;
|
||||||
|
|
||||||
|
require_once(PATH_CORE . 'controllers/pmTablesProxy.php');
|
||||||
|
|
||||||
|
if ($flagNew == 1) {
|
||||||
|
$pmTablesProxy = new \pmTablesProxy();
|
||||||
|
|
||||||
|
$obj = new \stdClass();
|
||||||
|
$obj->rows = \G::json_encode([['id' => $additionalTableUid, 'type' => '']]);
|
||||||
|
|
||||||
|
//Delete Report Table
|
||||||
|
$resultDeleteReportTable = $pmTablesProxy->delete($obj);
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$buildResult = ob_get_contents();
|
$buildResult = ob_get_contents();
|
||||||
|
|
||||||
|
|||||||
@@ -1270,6 +1270,40 @@ class TimerEvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($flagCase) {
|
if ($flagCase) {
|
||||||
|
//Update Timer-Event
|
||||||
|
$arrayData = [];
|
||||||
|
|
||||||
|
switch ($arrayTimerEventData['TMREVN_OPTION']) {
|
||||||
|
case 'HOURLY':
|
||||||
|
case 'DAILY':
|
||||||
|
case 'MONTHLY':
|
||||||
|
case 'EVERY':
|
||||||
|
if ($timerEventNextRunDateNew == '') {
|
||||||
|
$timerEventNextRunDateNew = $this->getNextRunDateByDataAndDatetime(
|
||||||
|
$arrayTimerEventData, $timerEventNextRunDate, false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($arrayTimerEventData['TMREVN_OPTION'] != 'EVERY' &&
|
||||||
|
$arrayTimerEventData['TMREVN_END_DATE'] . '' != '' &&
|
||||||
|
strtotime($timerEventNextRunDateNew) > strtotime($arrayTimerEventData['TMREVN_END_DATE'] . ' 23:59:59')
|
||||||
|
) {
|
||||||
|
$arrayData['TMREVN_STATUS'] = 'PROCESSED';
|
||||||
|
} else {
|
||||||
|
$arrayData['TMREVN_NEXT_RUN_DATE'] = $timerEventNextRunDateNew;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'ONE-DATE-TIME':
|
||||||
|
$arrayData['TMREVN_STATUS'] = 'PROCESSED';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$arrayData['TMREVN_LAST_RUN_DATE'] = $timerEventNextRunDate;
|
||||||
|
$arrayData['TMREVN_LAST_EXECUTION_DATE'] = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$result = $this->singleUpdate($arrayTimerEventData['TMREVN_UID'], $arrayData);
|
||||||
|
|
||||||
|
//Show info in terminal
|
||||||
if ($flagRecord) {
|
if ($flagRecord) {
|
||||||
$common->frontEndShow("TEXT", "");
|
$common->frontEndShow("TEXT", "");
|
||||||
}
|
}
|
||||||
@@ -1314,36 +1348,6 @@ class TimerEvent
|
|||||||
$this->log("CREATED-NEW-CASE", "Failed: " . $arrayResult["message"] . ", PRO_UID: " . $arrayTimerEventData["PRJ_UID"]);
|
$this->log("CREATED-NEW-CASE", "Failed: " . $arrayResult["message"] . ", PRO_UID: " . $arrayTimerEventData["PRJ_UID"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Update Timer-Event
|
|
||||||
$arrayData = array();
|
|
||||||
|
|
||||||
switch ($arrayTimerEventData["TMREVN_OPTION"]) {
|
|
||||||
case "HOURLY":
|
|
||||||
case "DAILY":
|
|
||||||
case "MONTHLY":
|
|
||||||
case "EVERY":
|
|
||||||
if ($timerEventNextRunDateNew == "") {
|
|
||||||
$timerEventNextRunDateNew = $this->getNextRunDateByDataAndDatetime($arrayTimerEventData, $timerEventNextRunDate, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($arrayTimerEventData["TMREVN_OPTION"] != "EVERY" &&
|
|
||||||
$arrayTimerEventData["TMREVN_END_DATE"] . "" != "" && strtotime($timerEventNextRunDateNew) > strtotime($arrayTimerEventData["TMREVN_END_DATE"] . " 23:59:59")
|
|
||||||
) {
|
|
||||||
$arrayData["TMREVN_STATUS"] = "PROCESSED";
|
|
||||||
} else {
|
|
||||||
$arrayData["TMREVN_NEXT_RUN_DATE"] = $timerEventNextRunDateNew;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "ONE-DATE-TIME":
|
|
||||||
$arrayData["TMREVN_STATUS"] = "PROCESSED";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$arrayData["TMREVN_LAST_RUN_DATE"] = $timerEventNextRunDate;
|
|
||||||
$arrayData["TMREVN_LAST_EXECUTION_DATE"] = date("Y-m-d H:i:s");
|
|
||||||
|
|
||||||
$result = $this->singleUpdate($arrayTimerEventData["TMREVN_UID"], $arrayData);
|
|
||||||
|
|
||||||
$flagRecord = true;
|
$flagRecord = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1513,6 +1517,7 @@ class TimerEvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($flagCase) {
|
if ($flagCase) {
|
||||||
|
//Show info in terminal
|
||||||
if ($flagRecord) {
|
if ($flagRecord) {
|
||||||
$common->frontEndShow("TEXT", "");
|
$common->frontEndShow("TEXT", "");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -504,16 +504,30 @@ class User
|
|||||||
\G::LoadSystem("rbac");
|
\G::LoadSystem("rbac");
|
||||||
|
|
||||||
//Verify data
|
//Verify data
|
||||||
$process = new \ProcessMaker\BusinessModel\Process();
|
|
||||||
$validator = new \ProcessMaker\BusinessModel\Validator();
|
$validator = new \ProcessMaker\BusinessModel\Validator();
|
||||||
|
|
||||||
$validator->throwExceptionIfDataIsNotArray($arrayData, "\$arrayData");
|
$validator->throwExceptionIfDataIsNotArray($arrayData, "\$arrayData");
|
||||||
$validator->throwExceptionIfDataIsEmpty($arrayData, "\$arrayData");
|
$validator->throwExceptionIfDataIsEmpty($arrayData, "\$arrayData");
|
||||||
|
|
||||||
//Set data
|
//Set data
|
||||||
$arrayData = array_change_key_case($arrayData, CASE_UPPER);
|
$arrayDataAux = array_change_key_case($arrayData, CASE_UPPER);
|
||||||
|
$arrayData = $arrayDataAux;
|
||||||
|
|
||||||
unset($arrayData["USR_UID"]);
|
unset(
|
||||||
|
$arrayData['USR_UID'],
|
||||||
|
$arrayData['USR_COST_BY_HOUR'],
|
||||||
|
$arrayData['USR_UNIT_COST']
|
||||||
|
);
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
if (array_key_exists('USR_COST_BY_HOUR', $arrayDataAux)) {
|
||||||
|
$arrayData['USR_COST_BY_HOUR'] = $arrayDataAux['USR_COST_BY_HOUR'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_key_exists('USR_UNIT_COST', $arrayDataAux)) {
|
||||||
|
$arrayData['USR_UNIT_COST'] = $arrayDataAux['USR_UNIT_COST'];
|
||||||
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
$this->throwExceptionIfDataIsInvalid("", $arrayData);
|
$this->throwExceptionIfDataIsInvalid("", $arrayData);
|
||||||
|
|
||||||
@@ -604,16 +618,31 @@ class User
|
|||||||
\G::LoadSystem("rbac");
|
\G::LoadSystem("rbac");
|
||||||
|
|
||||||
//Verify data
|
//Verify data
|
||||||
$process = new \ProcessMaker\BusinessModel\Process();
|
|
||||||
$validator = new \ProcessMaker\BusinessModel\Validator();
|
$validator = new \ProcessMaker\BusinessModel\Validator();
|
||||||
|
|
||||||
$validator->throwExceptionIfDataIsNotArray($arrayData, "\$arrayData");
|
$validator->throwExceptionIfDataIsNotArray($arrayData, "\$arrayData");
|
||||||
$validator->throwExceptionIfDataIsEmpty($arrayData, "\$arrayData");
|
$validator->throwExceptionIfDataIsEmpty($arrayData, "\$arrayData");
|
||||||
|
|
||||||
//Set data
|
//Set data
|
||||||
$arrayData = array_change_key_case($arrayData, CASE_UPPER);
|
$arrayDataAux = array_change_key_case($arrayData, CASE_UPPER);
|
||||||
|
$arrayData = $arrayDataAux;
|
||||||
$arrayDataBackup = $arrayData;
|
$arrayDataBackup = $arrayData;
|
||||||
|
|
||||||
|
unset(
|
||||||
|
$arrayData['USR_COST_BY_HOUR'],
|
||||||
|
$arrayData['USR_UNIT_COST']
|
||||||
|
);
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
if (array_key_exists('USR_COST_BY_HOUR', $arrayDataAux)) {
|
||||||
|
$arrayData['USR_COST_BY_HOUR'] = $arrayDataAux['USR_COST_BY_HOUR'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_key_exists('USR_UNIT_COST', $arrayDataAux)) {
|
||||||
|
$arrayData['USR_UNIT_COST'] = $arrayDataAux['USR_UNIT_COST'];
|
||||||
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
//Verify data
|
//Verify data
|
||||||
$this->throwExceptionIfNotExistsUser($userUid, $this->arrayFieldNameForException["usrUid"]);
|
$this->throwExceptionIfNotExistsUser($userUid, $this->arrayFieldNameForException["usrUid"]);
|
||||||
|
|
||||||
@@ -625,12 +654,13 @@ class User
|
|||||||
$permission = $this->loadUserRolePermission("PROCESSMAKER", $userUidLogged);
|
$permission = $this->loadUserRolePermission("PROCESSMAKER", $userUidLogged);
|
||||||
|
|
||||||
foreach ($permission as $key => $value) {
|
foreach ($permission as $key => $value) {
|
||||||
if ($value["PER_CODE"] == "PM_USERS") {
|
if (preg_match('/^(?:PM_USERS|PM_EDITPERSONALINFO)$/', $value['PER_CODE'])) {
|
||||||
$countPermission = $countPermission + 1;
|
$countPermission = $countPermission + 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($countPermission != 1) {
|
if ($countPermission == 0) {
|
||||||
throw new \Exception(\G::LoadTranslation("ID_USER_CAN_NOT_UPDATE", array($userUidLogged)));
|
throw new \Exception(\G::LoadTranslation("ID_USER_CAN_NOT_UPDATE", array($userUidLogged)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1260,9 +1290,7 @@ class User
|
|||||||
\G::resizeImage(PATH_IMAGES_ENVIRONMENT_USERS . $userUid . '.' . $aAux[1], 96, 96, PATH_IMAGES_ENVIRONMENT_USERS . $userUid . '.gif');
|
\G::resizeImage(PATH_IMAGES_ENVIRONMENT_USERS . $userUid . '.' . $aAux[1], 96, 96, PATH_IMAGES_ENVIRONMENT_USERS . $userUid . '.gif');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result->success = false;
|
throw new \Exception(\G::LoadTranslation('ID_ERROR') . ' ' . $_FILES['USR_PHOTO']['error']);
|
||||||
$result->fileError = true;
|
|
||||||
throw (new \Exception($result));
|
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
@@ -1409,5 +1437,38 @@ class User
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AuditLog
|
||||||
|
*
|
||||||
|
* @param string $option Option
|
||||||
|
* @param array $arrayData Data
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function auditLog($option, array $arrayData)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$firstName = (array_key_exists('USR_FIRSTNAME', $arrayData))? ' - First Name: ' . $arrayData['USR_FIRSTNAME'] : '';
|
||||||
|
$lastName = (array_key_exists('USR_LASTNAME', $arrayData))? ' - Last Name: ' . $arrayData['USR_LASTNAME'] : '';
|
||||||
|
$email = (array_key_exists('USR_EMAIL', $arrayData))? ' - Email: ' . $arrayData['USR_EMAIL'] : '';
|
||||||
|
$dueDate = (array_key_exists('USR_DUE_DATE', $arrayData))? ' - Due Date: ' . $arrayData['USR_DUE_DATE'] : '';
|
||||||
|
$status = (array_key_exists('USR_STATUS', $arrayData))? ' - Status: ' . $arrayData['USR_STATUS'] : '';
|
||||||
|
$address = (array_key_exists('USR_ADDRESS', $arrayData))? ' - Address: ' . $arrayData['USR_ADDRESS'] : '';
|
||||||
|
$phone = (array_key_exists('USR_PHONE', $arrayData))? ' - Phone: ' . $arrayData['USR_PHONE'] : '';
|
||||||
|
$zipCode = (array_key_exists('USR_ZIP_CODE', $arrayData))? ' - Zip Code: ' . $arrayData['USR_ZIP_CODE'] : '';
|
||||||
|
$position = (array_key_exists('USR_POSITION', $arrayData))? ' - Position: ' . $arrayData['USR_POSITION'] : '';
|
||||||
|
$role = (array_key_exists('USR_ROLE', $arrayData))? ' - Role: ' . $arrayData['USR_ROLE'] : '';
|
||||||
|
$languageDef = (array_key_exists('USR_DEFAULT_LANG', $arrayData))? ' - Default Language: ' . $arrayData['USR_DEFAULT_LANG'] : '';
|
||||||
|
$timeZone = (array_key_exists('USR_TIME_ZONE', $arrayData))? ' - Time Zone: ' . $arrayData['USR_TIME_ZONE'] : '';
|
||||||
|
|
||||||
|
$str = 'User Name: ' . $arrayData['USR_USERNAME'] . ' - User ID: (' . $arrayData['USR_UID'] . ')' .
|
||||||
|
$firstName . $lastName . $email . $dueDate . $status . $address . $phone . $zipCode . $position . $role . $timeZone . $languageDef;
|
||||||
|
|
||||||
|
\G::auditLog(($option == 'INS')? 'CreateUser' : 'UpdateUser', $str);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ use \G;
|
|||||||
|
|
||||||
class Variable
|
class Variable
|
||||||
{
|
{
|
||||||
|
public $variableTypes = array('string', 'integer', 'float', 'boolean', 'datetime', 'grid', 'array', 'file');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Variable for a Process
|
* Create Variable for a Process
|
||||||
*
|
*
|
||||||
@@ -44,6 +46,7 @@ class Variable
|
|||||||
throw new \Exception(\G::LoadTranslation("ID_CAN_NOT_BE_NULL", array('$var_name' )));
|
throw new \Exception(\G::LoadTranslation("ID_CAN_NOT_BE_NULL", array('$var_name' )));
|
||||||
}
|
}
|
||||||
if (isset($arrayData["VAR_FIELD_TYPE"])) {
|
if (isset($arrayData["VAR_FIELD_TYPE"])) {
|
||||||
|
$arrayData["VAR_FIELD_TYPE"] = $this->validateVarFieldType($arrayData["VAR_FIELD_TYPE"]);
|
||||||
$variable->setVarFieldType($arrayData["VAR_FIELD_TYPE"]);
|
$variable->setVarFieldType($arrayData["VAR_FIELD_TYPE"]);
|
||||||
} else {
|
} else {
|
||||||
throw new \Exception(\G::LoadTranslation("ID_CAN_NOT_BE_NULL", array('$var_field_type' )));
|
throw new \Exception(\G::LoadTranslation("ID_CAN_NOT_BE_NULL", array('$var_field_type' )));
|
||||||
@@ -151,6 +154,7 @@ class Variable
|
|||||||
$variable->setVarName($arrayData["VAR_NAME"]);
|
$variable->setVarName($arrayData["VAR_NAME"]);
|
||||||
}
|
}
|
||||||
if (isset($arrayData["VAR_FIELD_TYPE"])) {
|
if (isset($arrayData["VAR_FIELD_TYPE"])) {
|
||||||
|
$arrayData["VAR_FIELD_TYPE"] = $this->validateVarFieldType($arrayData["VAR_FIELD_TYPE"]);
|
||||||
$variable->setVarFieldType($arrayData["VAR_FIELD_TYPE"]);
|
$variable->setVarFieldType($arrayData["VAR_FIELD_TYPE"]);
|
||||||
}
|
}
|
||||||
if (isset($arrayData["VAR_FIELD_SIZE"])) {
|
if (isset($arrayData["VAR_FIELD_SIZE"])) {
|
||||||
@@ -1076,4 +1080,13 @@ class Variable
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function validateVarFieldType($type)
|
||||||
|
{
|
||||||
|
$vType = strtolower($type);
|
||||||
|
if(!in_array($vType, $this->variableTypes)) {
|
||||||
|
throw new \Exception(\G::LoadTranslation("ID_RECORD_CANNOT_BE_CREATED"));
|
||||||
|
}
|
||||||
|
return $vType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -816,16 +816,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($elementUidDest != ""){
|
$this->arrayElementTaskRelation[$elementUid] = $taskUid;
|
||||||
$aElement[$elementUid] = $elementUidDest;
|
|
||||||
if($routeType === 'SEC-JOIN'){
|
|
||||||
$this->arrayElementTaskRelation[$elementUid] = $taskUid;
|
|
||||||
}else
|
|
||||||
$this->arrayElementTaskRelation = $aElement;
|
|
||||||
}else {
|
|
||||||
//Array - Add element
|
|
||||||
$this->arrayElementTaskRelation[$elementUid] = $taskUid;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
|
|||||||
@@ -85,8 +85,9 @@ class InputDocument extends Api
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$userUid = $this->getUserId();
|
$userUid = $this->getUserId();
|
||||||
|
|
||||||
$inputDocument = new \ProcessMaker\BusinessModel\Cases\InputDocument();
|
$inputDocument = new \ProcessMaker\BusinessModel\Cases\InputDocument();
|
||||||
$response = $inputDocument->addCasesInputDocument($app_uid, $tas_uid, $app_doc_comment, $inp_doc_uid, $userUid);
|
$response = $inputDocument->addCasesInputDocument($app_uid, $tas_uid, $app_doc_comment, $inp_doc_uid, $userUid, false);
|
||||||
return $response;
|
return $response;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
|
|||||||
@@ -655,6 +655,14 @@ Ext.onReady ( function() {
|
|||||||
defaults: {
|
defaults: {
|
||||||
sortable: true // columns are sortable by default
|
sortable: true // columns are sortable by default
|
||||||
},
|
},
|
||||||
|
listeners: {
|
||||||
|
hiddenchange: function (columnModel, columnIndex, hidden) {
|
||||||
|
var grid = Ext.getCmp('casesGrid');
|
||||||
|
if (grid && grid.getView) {
|
||||||
|
grid.getView().refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
columns: columns
|
columns: columns
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -923,7 +923,7 @@ function validateFieldSizeAutoincrement(valueType, defaultValue) {
|
|||||||
}
|
}
|
||||||
// setting table attributes for current editing process
|
// setting table attributes for current editing process
|
||||||
Ext.getCmp('REP_TAB_NAME').setValue(TABLE.ADD_TAB_NAME);
|
Ext.getCmp('REP_TAB_NAME').setValue(TABLE.ADD_TAB_NAME);
|
||||||
Ext.getCmp('REP_TAB_NAME').setDisabled(true);
|
Ext.getCmp('REP_TAB_NAME').setDisabled(false);
|
||||||
Ext.getCmp('REP_TAB_DSC').setValue(TABLE.ADD_TAB_DESCRIPTION);
|
Ext.getCmp('REP_TAB_DSC').setValue(TABLE.ADD_TAB_DESCRIPTION);
|
||||||
|
|
||||||
// grid
|
// grid
|
||||||
@@ -1052,7 +1052,46 @@ function validateFieldSizeAutoincrement(valueType, defaultValue) {
|
|||||||
buttons:[ {
|
buttons:[ {
|
||||||
id: 'southPanelCreateUpdate',
|
id: 'southPanelCreateUpdate',
|
||||||
text: TABLE === false ? _("ID_CREATE") : _("ID_UPDATE"),
|
text: TABLE === false ? _("ID_CREATE") : _("ID_UPDATE"),
|
||||||
handler: createReportTable
|
handler: function()
|
||||||
|
{
|
||||||
|
if (TABLE === false) {
|
||||||
|
createReportTable();
|
||||||
|
} else {
|
||||||
|
var oldRepTabName = TABLE.ADD_TAB_NAME;
|
||||||
|
var newRepTabName = Ext.getCmp("REP_TAB_NAME").getValue().trim();
|
||||||
|
|
||||||
|
if (newRepTabName != "") {
|
||||||
|
if (oldRepTabName != newRepTabName) {
|
||||||
|
Ext.MessageBox.show({
|
||||||
|
title: _("ID_CONFIRM"),
|
||||||
|
msg: _("ID_RT_RENAME_NAME_TABLE"),
|
||||||
|
icon: Ext.MessageBox.QUESTION,
|
||||||
|
buttons: {
|
||||||
|
yes: _("ID_RT_CONTINUE_TABLE_RENAME"),
|
||||||
|
no: _("ID_RT_NOT_CHANGE_NAME")
|
||||||
|
},
|
||||||
|
fn: function (buttonId, text, opt)
|
||||||
|
{
|
||||||
|
if (buttonId == "yes") {
|
||||||
|
createReportTable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
createReportTable();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
PMExt.error(
|
||||||
|
_("ID_ERROR"),
|
||||||
|
_("ID_TABLE_NAME_IS_REQUIRED"),
|
||||||
|
function()
|
||||||
|
{
|
||||||
|
Ext.getCmp("REP_TAB_NAME").focus();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
id: 'southPanelCancel',
|
id: 'southPanelCancel',
|
||||||
text:_("ID_CANCEL"),
|
text:_("ID_CANCEL"),
|
||||||
|
|||||||
@@ -1295,6 +1295,7 @@ function exportImportProcessObjects(typeAction)
|
|||||||
fn : function(){},
|
fn : function(){},
|
||||||
icon : Ext.MessageBox.ERROR
|
icon : Ext.MessageBox.ERROR
|
||||||
});
|
});
|
||||||
|
processesGrid.store.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1545,6 +1546,7 @@ importProcessExistGroup = function()
|
|||||||
fn : function(){},
|
fn : function(){},
|
||||||
icon : Ext.MessageBox.ERROR
|
icon : Ext.MessageBox.ERROR
|
||||||
});
|
});
|
||||||
|
processesGrid.store.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1713,29 +1715,42 @@ importProcessExistProcess = function()
|
|||||||
success: function(o, resp) {
|
success: function(o, resp) {
|
||||||
var resp_ = Ext.util.JSON.decode(resp.response.responseText);
|
var resp_ = Ext.util.JSON.decode(resp.response.responseText);
|
||||||
var sNewProUid = resp_.sNewProUid;
|
var sNewProUid = resp_.sNewProUid;
|
||||||
|
if (resp_.catchMessage != '') {
|
||||||
|
w.close();
|
||||||
|
Ext.getCmp('importProcessWindow').close()
|
||||||
|
Ext.MessageBox.show({
|
||||||
|
title : _('ID_ERROR'),
|
||||||
|
msg : resp_.catchMessage,
|
||||||
|
buttons : Ext.MessageBox.OK,
|
||||||
|
animEl : 'mb9',
|
||||||
|
fn : function(){},
|
||||||
|
icon : Ext.MessageBox.ERROR
|
||||||
|
});
|
||||||
|
processesGrid.store.reload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(resp_.isGranularImport) {
|
if(resp_.isGranularImport) {
|
||||||
importProcessGlobal.isGranularImport = resp_.isGranularImport;
|
importProcessGlobal.isGranularImport = resp_.isGranularImport;
|
||||||
importProcessGlobal.objectGranularImport = resp_.objectGranularImport;
|
importProcessGlobal.objectGranularImport = resp_.objectGranularImport;
|
||||||
exportImportProcessObjects('import');
|
exportImportProcessObjects('import');
|
||||||
} else {
|
} else {
|
||||||
if (resp_.ExistGroupsInDatabase == 0) {
|
if (resp_.ExistGroupsInDatabase == 0) {
|
||||||
if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") {
|
if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") {
|
||||||
if (typeof(resp_.project_type_aux) != "undefined" && resp_.project_type_aux == "NORMAL") {
|
if (typeof(resp_.project_type_aux) != "undefined" && resp_.project_type_aux == "NORMAL") {
|
||||||
importProcessCallbackFile = false;
|
importProcessCallbackFile = false;
|
||||||
}
|
}
|
||||||
var goTo = importProcessCallbackFile ? importProcessCallbackFile : "../designer?prj_uid=";
|
var goTo = importProcessCallbackFile ? importProcessCallbackFile : "../designer?prj_uid=";
|
||||||
openWindowIfIE(goTo + sNewProUid);
|
openWindowIfIE(goTo + sNewProUid);
|
||||||
} else {
|
} else {
|
||||||
window.location.href = "processes_Map?PRO_UID=" + sNewProUid;
|
window.location.href = "processes_Map?PRO_UID=" + sNewProUid;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
affectedGroups = resp_.affectedGroups;
|
||||||
affectedGroups = resp_.affectedGroups;
|
importProcessGlobal.proFileName = resp_.proFileName;
|
||||||
importProcessGlobal.proFileName = resp_.proFileName;
|
importProcessGlobal.groupBeforeAccion = resp_.groupBeforeAccion;
|
||||||
importProcessGlobal.groupBeforeAccion = resp_.groupBeforeAccion;
|
importProcessGlobal.sNewProUid = resp_.sNewProUid;
|
||||||
importProcessGlobal.sNewProUid = resp_.sNewProUid;
|
importProcessGlobal.importOption = resp_.importOption;
|
||||||
importProcessGlobal.importOption = resp_.importOption;
|
importProcessExistGroup();
|
||||||
importProcessExistGroup();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1751,6 +1766,7 @@ importProcessExistProcess = function()
|
|||||||
fn : function(){},
|
fn : function(){},
|
||||||
icon : Ext.MessageBox.ERROR
|
icon : Ext.MessageBox.ERROR
|
||||||
});
|
});
|
||||||
|
processesGrid.store.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2031,6 +2047,7 @@ importProcess = function()
|
|||||||
fn : function(){},
|
fn : function(){},
|
||||||
icon : Ext.MessageBox.ERROR
|
icon : Ext.MessageBox.ERROR
|
||||||
});
|
});
|
||||||
|
processesGrid.store.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2046,6 +2063,7 @@ importProcess = function()
|
|||||||
fn : function(){},
|
fn : function(){},
|
||||||
icon : Ext.MessageBox.ERROR
|
icon : Ext.MessageBox.ERROR
|
||||||
});
|
});
|
||||||
|
processesGrid.store.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2169,6 +2187,7 @@ importProcessBpmnSubmit = function () {
|
|||||||
},
|
},
|
||||||
icon: Ext.MessageBox.ERROR
|
icon: Ext.MessageBox.ERROR
|
||||||
});
|
});
|
||||||
|
processesGrid.store.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1226,7 +1226,7 @@ function userFrmEditSubmit()
|
|||||||
Ext.getCmp("frmDetails").getForm().submit({
|
Ext.getCmp("frmDetails").getForm().submit({
|
||||||
url : "usersAjax",
|
url : "usersAjax",
|
||||||
params : {
|
params : {
|
||||||
action : "saveUser",
|
action: __ACTION__,
|
||||||
USR_UID : USR_UID,
|
USR_UID : USR_UID,
|
||||||
USR_CITY : global.IS_UID
|
USR_CITY : global.IS_UID
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -303,6 +303,9 @@ if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 ||
|
|||||||
}
|
}
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
|
ini_set( 'session.cookie_httponly', 1 );
|
||||||
|
ini_set( 'session.cookie_secure', 1 );
|
||||||
|
|
||||||
//$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
//$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
||||||
//$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
//$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
||||||
//$e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE;
|
//$e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE;
|
||||||
|
|||||||
Reference in New Issue
Block a user