Merge remote-tracking branch 'upstream/3.0.1.7' into 3.0.1.7-Gmail
This commit is contained in:
@@ -234,6 +234,7 @@ class Installer
|
||||
$this->log("Write: " . $db_file . " => " . ((!$ff) ? $ff : "OK") . "\n", $ff === false);
|
||||
fclose($fp);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//Generate the env.ini file
|
||||
$envIniFile = $path_site . 'env.ini';
|
||||
$content = 'system_utc_time_zone = 1' . "\n";
|
||||
@@ -243,6 +244,7 @@ class Installer
|
||||
$ff = @fputs($fp, $content, strlen($content));
|
||||
$this->log('Write: ' . $envIniFile . ' => ' . ((!$ff)? $ff : 'OK') . "\n", $ff === false);
|
||||
fclose($fp);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Set data
|
||||
$this->setPartner();
|
||||
|
||||
@@ -186,6 +186,7 @@ class actionsByEmailCoreClass extends PMPlugin
|
||||
$field->label = 'Test';
|
||||
$field->type = 'dropdown';
|
||||
$field->options = array();
|
||||
$field->value = '';
|
||||
$actionField = str_replace(array('@@','@#','@=','@%','@?','@$'), '', $configuration['ABE_ACTION_FIELD']);
|
||||
$dynaform = $configuration['DYN_UID'];
|
||||
$variables = G::json_decode($configuration['DYN_CONTENT'], true);
|
||||
@@ -237,12 +238,12 @@ class actionsByEmailCoreClass extends PMPlugin
|
||||
$__ABE__.='</tr></table></td>';
|
||||
break;
|
||||
case 'yesno':
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . 'dataField?APP_UID=' . urlencode(G::encrypt($data->APP_UID, URL_KEY)) . '&DEL_INDEX=' . urlencode(G::encrypt($data->DEL_INDEX, URL_KEY)). '&FIELD=' . urlencode(G::encrypt($actionField, URL_KEY)) . '&VALUE=' . urlencode(G::encrypt(1, URL_KEY)) . '&ABER=' . urlencode(G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY)) . '" target="_blank">' . G::LoadTranslation('ID_YES_VALUE') . '</a></td>';
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . 'dataField?APP_UID=' . urlencode(G::encrypt($data->APP_UID, URL_KEY)) . '&DEL_INDEX=' . urlencode(G::encrypt($data->DEL_INDEX, URL_KEY)) . '&FIELD=' . urlencode(G::encrypt($actionField, URL_KEY)) . '&VALUE=' . urlencode(G::encrypt(0, URL_KEY)) . '&ABER=' . urlencode(G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY)) . '" target="_blank">' . G::LoadTranslation('ID_NO_VALUE') . '</a></td>';
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . '?ACTION=' . G::encrypt('processABE', URL_KEY) . '&APP_UID=' . urlencode(G::encrypt($data->APP_UID, URL_KEY)) . '&DEL_INDEX=' . urlencode(G::encrypt($data->DEL_INDEX, URL_KEY)). '&FIELD=' . urlencode(G::encrypt($actionField, URL_KEY)) . '&VALUE=' . urlencode(G::encrypt(1, URL_KEY)) . '&ABER=' . urlencode(G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY)) . '" target="_blank">' . G::LoadTranslation('ID_YES_VALUE') . '</a></td>';
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . '?ACTION=' . G::encrypt('processABE', URL_KEY) . '&APP_UID=' . urlencode(G::encrypt($data->APP_UID, URL_KEY)) . '&DEL_INDEX=' . urlencode(G::encrypt($data->DEL_INDEX, URL_KEY)) . '&FIELD=' . urlencode(G::encrypt($actionField, URL_KEY)) . '&VALUE=' . urlencode(G::encrypt(0, URL_KEY)) . '&ABER=' . urlencode(G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY)) . '" target="_blank">' . G::LoadTranslation('ID_NO_VALUE') . '</a></td>';
|
||||
break;
|
||||
case 'checkbox':
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . 'dataField?APP_UID=' . G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&FIELD=' . G::encrypt($actionField, URL_KEY) . '&VALUE=' . G::encrypt($field->value, URL_KEY) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">Check</a></td>';
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . 'dataField?APP_UID=' . G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&FIELD=' . G::encrypt($actionField, URL_KEY) . '&VALUE=' . G::encrypt($field->value, URL_KEY) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">Uncheck</a></td>';
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . '?ACTION=' . G::encrypt('processABE', URL_KEY) . '&APP_UID=' . G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&FIELD=' . G::encrypt($actionField, URL_KEY) . '&VALUE=' . G::encrypt($field->value, URL_KEY) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">Check</a></td>';
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . '?ACTION=' . G::encrypt('processABE', URL_KEY) . '&APP_UID=' . G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&FIELD=' . G::encrypt($actionField, URL_KEY) . '&VALUE=' . G::encrypt($field->value, URL_KEY) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">Uncheck</a></td>';
|
||||
break;
|
||||
}
|
||||
$__ABE__ .= '</tr></table>';
|
||||
|
||||
@@ -512,20 +512,20 @@ class Applications
|
||||
$oCriteria->addAscendingOrderByColumn(FieldsPeer::FLD_INDEX);
|
||||
|
||||
$oDataset = FieldsPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$row = $oDataset->getRow();
|
||||
if (is_array($row)) {
|
||||
|
||||
if ($oDataset->next()) {
|
||||
$sort = $tableNameAux . "." . $sortTable[1];
|
||||
}
|
||||
}
|
||||
|
||||
if ($sort == "") {
|
||||
$sort = $sortBk;
|
||||
}
|
||||
$arraySelectColumn = $Criteria->getSelectColumns();
|
||||
|
||||
if (!in_array($sort, $Criteria->getSelectColumns())) {
|
||||
$sort = AppCacheViewPeer::APP_NUMBER; //DEFAULT VALUE
|
||||
if (!in_array($sort, $arraySelectColumn)) {
|
||||
$sort = $sortBk;
|
||||
|
||||
if (!in_array($sort, $arraySelectColumn)) {
|
||||
$sort = AppCacheViewPeer::APP_NUMBER; //DEFAULT VALUE
|
||||
}
|
||||
}
|
||||
|
||||
if ($dir == "DESC") {
|
||||
|
||||
@@ -2003,6 +2003,13 @@ class Cases
|
||||
$users = new Users();
|
||||
$users->refreshTotal($sUserUid, "remove", "inbox");
|
||||
}
|
||||
}else{
|
||||
//When start a case with SCRIPT-TASK WEBENTRYEVENT and the status is DRAFT
|
||||
if($oApplication->getAppStatus() == "DRAFT"){
|
||||
$sUserUid = $appDel->getUsrUid();
|
||||
$users = new Users();
|
||||
$users->refreshTotal($sUserUid, "remove", "draft");
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
@@ -4342,7 +4349,10 @@ class Cases
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);
|
||||
$oCriteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
|
||||
if (AppDelegationPeer::doCount($oCriteria) == 1) {
|
||||
$resAppDel = AppDelegationPeer::doCount($oCriteria);
|
||||
|
||||
$this->CloseCurrentDelegation($sApplicationUID, $iIndex);
|
||||
if ($resAppDel == 1) {
|
||||
$aFields['APP_STATUS'] = 'CANCELLED';
|
||||
$oApplication->update($aFields);
|
||||
|
||||
@@ -4353,7 +4363,6 @@ class Cases
|
||||
$oReportTables->updateTables($aFields['PRO_UID'], $aFields['APP_UID'], $aFields['APP_NUMBER'], $aFields['APP_DATA']);
|
||||
$addtionalTables->updateReportTables($aFields['PRO_UID'], $aFields['APP_UID'], $aFields['APP_NUMBER'], $aFields['APP_DATA'], $aFields['APP_STATUS']);
|
||||
}
|
||||
$this->CloseCurrentDelegation($sApplicationUID, $iIndex);
|
||||
$oAppDel = new AppDelegation();
|
||||
$oAppDel->Load($sApplicationUID, $iIndex);
|
||||
$aAppDel = $oAppDel->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
@@ -5503,6 +5512,29 @@ class Cases
|
||||
$sCc = $cc;
|
||||
}
|
||||
break;
|
||||
case "MULTIPLE_INSTANCE":
|
||||
$to = null;
|
||||
$cc = null;
|
||||
$sw = 1;
|
||||
$oDerivation = new Derivation();
|
||||
$userFields = $oDerivation->getUsersFullNameFromArray($oDerivation->getAllUsersFromAnyTask($aTask["TAS_UID"]));
|
||||
if(isset($userFields)){
|
||||
foreach($userFields as $row){
|
||||
$toAux = (
|
||||
(($row["USR_FIRSTNAME"] != "") || ($row["USR_LASTNAME"] != "")) ?
|
||||
$row["USR_FIRSTNAME"] . " " . $row["USR_LASTNAME"] . " " : ""
|
||||
) . "<" . $row["USR_EMAIL"] . ">";
|
||||
if ($sw == 1) {
|
||||
$to = $toAux;
|
||||
$sw = 0;
|
||||
} else {
|
||||
$cc = $cc . (($cc != null) ? "," : null) . $toAux;
|
||||
}
|
||||
}
|
||||
$sTo = $to;
|
||||
$sCc = $cc;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (isset($aTask["USR_UID"]) && !empty($aTask["USR_UID"])) {
|
||||
$aUser = $oUser->load($aTask["USR_UID"]);
|
||||
|
||||
@@ -330,7 +330,7 @@ class Configurations // extends Configuration
|
||||
|
||||
$aux = str_replace('@userName', trim($username), $theFormat);
|
||||
$aux = str_replace('@firstName', $oUser->getUsrFirstname(), $aux);
|
||||
$aux = str_replace('@lastName', $oUser->getUsrLastname(), $aux);
|
||||
$aux = str_replace('@lastName', $oUser->getUsrLastname(), $aux);
|
||||
}
|
||||
return $aux;
|
||||
}
|
||||
@@ -583,7 +583,7 @@ class Configurations // extends Configuration
|
||||
require_once 'model/Language.php';
|
||||
$language = new language();
|
||||
$lanLocation = $language->findLocationByLanId(SYS_LANG);
|
||||
$location = isset($lanLocation['LAN_LOCATION']) ? $lanLocation['LAN_LOCATION'] : '';
|
||||
$location = isset($lanLocation['LAN_LOCATION']) ? $lanLocation['LAN_LOCATION'] : '';
|
||||
|
||||
if (G::toLower(PHP_OS) == 'linux' || G::toLower(PHP_OS) == 'darwin') {
|
||||
if (SYS_LANG == 'es') {
|
||||
@@ -612,7 +612,7 @@ class Configurations // extends Configuration
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (defined('PARTNER_FLAG')) {
|
||||
setlocale(LC_TIME, $langLocate);
|
||||
$dateTime = utf8_encode(strftime($newCreation, mktime($h, $i, $s, $m, $d, $y)));
|
||||
@@ -698,7 +698,6 @@ class Configurations // extends Configuration
|
||||
$caseReaderFields[] = array("name" => "DEL_TASK_DUE_DATE");
|
||||
$caseReaderFields[] = array("name" => "APP_UPDATE_DATE");
|
||||
$caseReaderFields[] = array("name" => "DEL_PRIORITY");
|
||||
$caseReaderFields[] = array("name" => "APP_STATUS_LABEL");
|
||||
$caseReaderFields[] = array("name" => "APP_FINISH_DATE");
|
||||
$caseReaderFields[] = array("name" => "CASE_SUMMARY");
|
||||
$caseReaderFields[] = array("name" => "CASE_NOTES_COUNT");
|
||||
@@ -733,7 +732,6 @@ class Configurations // extends Configuration
|
||||
$caseReaderFields[] = array("name" => "DEL_TASK_DUE_DATE");
|
||||
$caseReaderFields[] = array("name" => "APP_UPDATE_DATE");
|
||||
$caseReaderFields[] = array("name" => "DEL_PRIORITY");
|
||||
$caseReaderFields[] = array("name" => "APP_STATUS_LABEL");
|
||||
$caseReaderFields[] = array("name" => "APP_FINISH_DATE");
|
||||
$caseReaderFields[] = array("name" => "APP_THREAD_INDEX");
|
||||
$caseReaderFields[] = array("name" => "CASE_SUMMARY");
|
||||
@@ -770,7 +768,6 @@ class Configurations // extends Configuration
|
||||
$caseReaderFields[] = array("name" => "DEL_TASK_DUE_DATE");
|
||||
$caseReaderFields[] = array("name" => "APP_UPDATE_DATE");
|
||||
$caseReaderFields[] = array("name" => "DEL_PRIORITY");
|
||||
$caseReaderFields[] = array("name" => "APP_STATUS_LABEL");
|
||||
$caseReaderFields[] = array("name" => "APP_FINISH_DATE");
|
||||
$caseReaderFields[] = array("name" => "CASE_SUMMARY");
|
||||
$caseReaderFields[] = array("name" => "CASE_NOTES_COUNT");
|
||||
@@ -843,7 +840,6 @@ class Configurations // extends Configuration
|
||||
$caseReaderFields[] = array("name" => "APP_UPDATE_DATE");
|
||||
$caseReaderFields[] = array("name" => "DEL_DELEGATE_DATE");
|
||||
$caseReaderFields[] = array("name" => "DEL_PRIORITY");
|
||||
$caseReaderFields[] = array("name" => "APP_STATUS_LABEL");
|
||||
$caseReaderFields[] = array("name" => "APP_FINISH_DATE");
|
||||
$caseReaderFields[] = array("name" => "CASE_SUMMARY");
|
||||
$caseReaderFields[] = array("name" => "CASE_NOTES_COUNT");
|
||||
|
||||
@@ -1027,8 +1027,19 @@ class Derivation
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aSP = $oDataset->getRow();
|
||||
$aSP['USR_UID'] = $nextDel['USR_UID'];
|
||||
$oTask = new Task();
|
||||
$aTaskNext = $oTask->load( $nextDel['TAS_UID'] );
|
||||
//When is MULTIPLE_INSTANCE catch the first user
|
||||
if($aTaskNext["TAS_ASSIGN_TYPE"] == "MULTIPLE_INSTANCE"){
|
||||
$spUserUid = $this->getAllUsersFromAnyTask($nextDel["TAS_UID"]);
|
||||
foreach($spUserUid as $row){
|
||||
$firstUserUid = $row;
|
||||
continue;
|
||||
}
|
||||
$aSP['USR_UID'] = $firstUserUid;
|
||||
}else{
|
||||
$aSP['USR_UID'] = $nextDel['USR_UID'];
|
||||
}
|
||||
$aTask = $oTask->load( $nextDel['TAS_PARENT'] );
|
||||
$nextDel = array ('TAS_UID' => $aTask['TAS_UID'],'USR_UID' => $aSP['USR_UID'],'TAS_ASSIGN_TYPE' => $aTask['TAS_ASSIGN_TYPE'],'TAS_DEF_PROC_CODE' => $aTask['TAS_DEF_PROC_CODE'],'DEL_PRIORITY' => 3,'TAS_PARENT' => ''
|
||||
);
|
||||
|
||||
@@ -231,6 +231,57 @@ class PMLicensedFeatures
|
||||
"type" => "features",
|
||||
"url" => "",
|
||||
"version" => ""
|
||||
),
|
||||
12 => array(
|
||||
"description" => "Integration with Gmail.",
|
||||
"enabled" => false,
|
||||
"id" => "pmGmail",
|
||||
"latest_version" => "",
|
||||
"log" => null,
|
||||
"name" => "pmGmail",
|
||||
"nick" => "pmGmail",
|
||||
"progress" => 0,
|
||||
"publisher" => "Colosa",
|
||||
"release_type" => "localRegistry",
|
||||
"status" => "ready",
|
||||
"store" => "00000000000000000000000000010012",
|
||||
"type" => "features",
|
||||
"url" => "",
|
||||
"version" => ""
|
||||
),
|
||||
13 => array(
|
||||
"description" => "User-based Language Management.",
|
||||
"enabled" => false,
|
||||
"id" => "userBasedLanguage",
|
||||
"latest_version" => "",
|
||||
"log" => null,
|
||||
"name" => "userBasedLanguage",
|
||||
"nick" => "userBasedLanguage",
|
||||
"progress" => 0,
|
||||
"publisher" => "Colosa",
|
||||
"release_type" => "localRegistry",
|
||||
"status" => "ready",
|
||||
"store" => "00000000000000000000000000010013",
|
||||
"type" => "features",
|
||||
"url" => "",
|
||||
"version" => ""
|
||||
),
|
||||
14 => array(
|
||||
"description" => "User-based Time Zone Management.",
|
||||
"enabled" => false,
|
||||
"id" => "userBasedTimeZone",
|
||||
"latest_version" => "",
|
||||
"log" => null,
|
||||
"name" => "userBasedTimeZone",
|
||||
"nick" => "userBasedTimeZone",
|
||||
"progress" => 0,
|
||||
"publisher" => "Colosa",
|
||||
"release_type" => "localRegistry",
|
||||
"status" => "ready",
|
||||
"store" => "00000000000000000000000000010014",
|
||||
"type" => "features",
|
||||
"url" => "",
|
||||
"version" => ""
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ class pmDynaform
|
||||
$this->fields = $fields;
|
||||
$this->getDynaform();
|
||||
$this->getDynaforms();
|
||||
$this->synchronizeSubDynaform();
|
||||
$this->getCredentials();
|
||||
if (!isset($this->fields["APP_UID"])) {
|
||||
$this->fields["APP_UID"] = null;
|
||||
@@ -292,7 +293,16 @@ class pmDynaform
|
||||
$json->data->label = "";
|
||||
if (isset($this->fields["APP_DATA"][$json->name])) {
|
||||
$json->data->value = $this->fields["APP_DATA"][$json->name];
|
||||
$json->data->label = $this->fields["APP_DATA"][$json->name];
|
||||
foreach ($json->options as $os) {
|
||||
if (($json->data->value === true || $json->data->value === 1 || $json->data->value === "1") &&
|
||||
($os->value === true || $os->value === 1 || $os->value === "1")) {
|
||||
$json->data->label = $os->label;
|
||||
}
|
||||
if (($json->data->value === false || $json->data->value === 0 || $json->data->value === "0") &&
|
||||
($os->value === false || $os->value === 0 || $os->value === "0")) {
|
||||
$json->data->label = $os->label;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "checkgroup")) {
|
||||
@@ -350,17 +360,21 @@ class pmDynaform
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oCriteria = new Criteria("workflow");
|
||||
$oCriteria->addSelectColumn(AppDocumentPeer::APP_DOC_UID);
|
||||
$oCriteria->addSelectColumn(AppDocumentPeer::DOC_VERSION);
|
||||
$oCriteria->addSelectColumn(AppDocumentPeer::DOC_VERSION);
|
||||
$oCriteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($enablePMGmail) {
|
||||
$oCriteria->addSelectColumn(AppDocumentPeer::APP_DOC_DRIVE_DOWNLOAD);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oCriteria->addJoin(AppDocumentPeer::APP_DOC_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(AppDocumentPeer::APP_UID, $this->fields["APP_DATA"]["APPLICATION"]);
|
||||
$oCriteria->add(AppDocumentPeer::APP_DOC_FIELDNAME, $json->name);
|
||||
$oCriteria->add(ContentPeer::CON_CATEGORY, 'APP_DOC_FILENAME');
|
||||
$rs = AppDocumentPeer::doSelectRS($oCriteria);
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$links = array();
|
||||
$labelsFromDb = array();
|
||||
while ($rs->next()) {
|
||||
$row = $rs->getRow();
|
||||
$linkDownload = "../cases/cases_ShowDocument?a=" . $row["APP_DOC_UID"] . "&v=" . $row["DOC_VERSION"];
|
||||
@@ -374,10 +388,16 @@ class pmDynaform
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
array_push($links, $linkDownload);
|
||||
array_push($labelsFromDb, $row["CON_VALUE"]);
|
||||
}
|
||||
$json->data = new stdClass();
|
||||
$json->data->value = $links;
|
||||
$json->data->label = isset($this->fields["APP_DATA"][$json->name . "_label"]) ? $this->fields["APP_DATA"][$json->name . "_label"] : "[]";
|
||||
$json->data->value = $links;
|
||||
|
||||
if(sizeof($labelsFromDb)) {
|
||||
$json->data->label = G::json_encode($labelsFromDb);
|
||||
} else {
|
||||
$json->data->label = isset($this->fields["APP_DATA"][$json->name . "_label"]) ? $this->fields["APP_DATA"][$json->name . "_label"] : (isset($this->fields["APP_DATA"][$json->name]) ? $this->fields["APP_DATA"][$json->name] : "[]");
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "file") && isset($json->variable)) {
|
||||
//todo
|
||||
@@ -494,7 +514,7 @@ class pmDynaform
|
||||
if ($key === "type" && ($value === "form") && $this->records != null) {
|
||||
foreach ($this->records as $ri) {
|
||||
if ($json->id === $ri["DYN_UID"] && !isset($json->jsonUpdate)) {
|
||||
$jsonUpdate = json_decode($ri["DYN_CONTENT"]);
|
||||
$jsonUpdate = G::json_decode($ri["DYN_CONTENT"]);
|
||||
$jsonUpdate = $jsonUpdate->items[0];
|
||||
$jsonUpdate->colSpan = $json->colSpan;
|
||||
$jsonUpdate->jsonUpdate = true;
|
||||
@@ -544,7 +564,7 @@ class pmDynaform
|
||||
$data[$json->variable === "" ? $json->id : $json->variable] = $json->options[0]->value;
|
||||
}
|
||||
if (isset($json->placeholder) && $json->placeholder !== "") {
|
||||
$data[$json->variable === "" ? $json->id : $json->variable] = $json->placeholder;
|
||||
$data[$json->variable === "" ? $json->id : $json->variable] = "";
|
||||
}
|
||||
if (isset($json->defaultValue) && $json->defaultValue !== "") {
|
||||
$data[$json->variable === "" ? $json->id : $json->variable] = $json->defaultValue;
|
||||
@@ -878,11 +898,12 @@ class pmDynaform
|
||||
$this->record = $record;
|
||||
$json = G::json_decode($this->record["DYN_CONTENT"]);
|
||||
$this->jsonr($json);
|
||||
$currentDynaform = (isset($this->fields['CURRENT_DYNAFORM']) && $this->fields['CURRENT_DYNAFORM'] != '')? $this->fields['CURRENT_DYNAFORM'] : '';
|
||||
$javascrip = "" .
|
||||
"<script type='text/javascript'>\n" .
|
||||
"var jsondata = " . G::json_encode($json) . ";\n" .
|
||||
"var pm_run_outside_main_app = null;\n" .
|
||||
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
|
||||
"var dyn_uid = '" . $currentDynaform . "';\n" .
|
||||
"var __DynaformName__ = null;\n" .
|
||||
"var app_uid = null;\n" .
|
||||
"var prj_uid = '" . $this->record["PRO_UID"] . "';\n" .
|
||||
@@ -902,6 +923,41 @@ class pmDynaform
|
||||
return $file;
|
||||
}
|
||||
|
||||
public function synchronizeSubDynaform()
|
||||
{
|
||||
if (!isset($this->record["DYN_CONTENT"])) {
|
||||
return;
|
||||
}
|
||||
$json = G::json_decode($this->record["DYN_CONTENT"]);
|
||||
foreach ($this->records as $ri) {
|
||||
$jsonSearch = $this->jsonsf($json, $ri["DYN_UID"], "id");
|
||||
if ($jsonSearch === null) {
|
||||
continue;
|
||||
}
|
||||
$jsonUpdate = G::json_decode($ri["DYN_CONTENT"]);
|
||||
$jsonUpdate = $jsonUpdate->items[0];
|
||||
$jsonUpdate->colSpan = $jsonSearch->colSpan;
|
||||
$this->jsonReplace($json, $ri["DYN_UID"], "id", $jsonUpdate);
|
||||
}
|
||||
$this->record["DYN_CONTENT"] = G::json_encode($json);
|
||||
}
|
||||
|
||||
private function jsonReplace(&$json, $id, $for = "id", $update)
|
||||
{
|
||||
foreach ($json as $key => &$value) {
|
||||
$sw1 = is_array($value);
|
||||
$sw2 = is_object($value);
|
||||
if ($sw1 || $sw2) {
|
||||
$this->jsonReplace($value, $id, $for, $update);
|
||||
}
|
||||
if (!$sw1 && !$sw2) {
|
||||
if ($key === $for && $id === $value) {
|
||||
$json = $update;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function synchronizeVariable($processUid, $newVariable, $oldVariable)
|
||||
{
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
@@ -564,6 +564,32 @@ class PMScript
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($this->aFields[$var]) && is_string($this->aFields[$var])) {
|
||||
$varInfo = $variableModule->getVariableTypeByName($_SESSION['PROCESS'], $var);
|
||||
$options = G::json_decode($varInfo["VAR_ACCEPTED_VALUES"]);
|
||||
$no = count($options);
|
||||
for ($io = 0; $io < $no; $io++) {
|
||||
if ($options[$io]->value === $this->aFields[$var]) {
|
||||
$this->aFields[$var . "_label"] = $options[$io]->label;
|
||||
}
|
||||
}
|
||||
if ($varInfo["VAR_DBCONNECTION"] !== "" && $varInfo["VAR_DBCONNECTION"] !== "none" && $varInfo["VAR_SQL"] !== "") {
|
||||
try {
|
||||
$cnn = Propel::getConnection($varInfo["VAR_DBCONNECTION"]);
|
||||
$stmt = $cnn->createStatement();
|
||||
$sql = G::replaceDataField($varInfo["VAR_SQL"], $this->aFields);
|
||||
$rs = $stmt->executeQuery($sql, \ResultSet::FETCHMODE_NUM);
|
||||
while ($rs->next()) {
|
||||
$row = $rs->getRow();
|
||||
if ($row[0] === $this->aFields[$var]) {
|
||||
$this->aFields[$var . "_label"] = isset($row[1]) ? $row[1] : $row[0];
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -877,6 +877,8 @@ class AppCacheView extends BaseAppCacheView
|
||||
}
|
||||
|
||||
foreach ($this->confCasesList["second"]["data"] as $fieldData) {
|
||||
$fieldData['name'] = ($fieldData['name'] == 'APP_STATUS_LABEL')? 'APP_STATUS' : $fieldData['name'];
|
||||
|
||||
if (in_array($fieldData["name"], $defaultFields)) {
|
||||
switch ($fieldData["fieldType"]) {
|
||||
case "case field":
|
||||
|
||||
@@ -24,9 +24,14 @@ class ListInbox extends BaseListInbox
|
||||
*
|
||||
*/
|
||||
public function create($data, $isSelfService = false)
|
||||
{
|
||||
{
|
||||
$con = Propel::getConnection( ListInboxPeer::DATABASE_NAME );
|
||||
try {
|
||||
if(isset($data['APP_TITLE'])) {
|
||||
$oCase = new Cases();
|
||||
$aData = $oCase->loadCase( $data["APP_UID"] );
|
||||
$data['APP_TITLE'] = G::replaceDataField($data['APP_TITLE'], $aData['APP_DATA']);
|
||||
}
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
@@ -97,6 +102,11 @@ class ListInbox extends BaseListInbox
|
||||
*/
|
||||
public function update($data, $isSelfService = false)
|
||||
{
|
||||
if(isset($data['APP_TITLE'])) {
|
||||
$oCase = new Cases();
|
||||
$aData = $oCase->loadCase( $data["APP_UID"] );
|
||||
$data['APP_TITLE'] = G::replaceDataField($data['APP_TITLE'], $aData['APP_DATA']);
|
||||
}
|
||||
if ($isSelfService) {
|
||||
$users = new Users();
|
||||
$users->refreshTotal($data['USR_UID'], 'add', 'inbox');
|
||||
|
||||
@@ -780,12 +780,14 @@ class Installer extends Controller
|
||||
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array($db_file) ));
|
||||
file_put_contents( $db_file, $dbText );
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//Generate the env.ini file
|
||||
$envIniFile = $path_site . 'env.ini';
|
||||
$content = 'system_utc_time_zone = 1' . "\n";
|
||||
|
||||
$this->installLog(G::LoadTranslation('ID_CREATING', SYS_LANG, [$envIniFile]));
|
||||
file_put_contents($envIniFile, $content);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Generate the databases.php file
|
||||
$databases_file = $path_site . 'databases.php';
|
||||
@@ -1240,6 +1242,10 @@ class Installer extends Controller
|
||||
$db_hostname = $filter->validateInput($_REQUEST['db_hostname']);
|
||||
$db_username = $filter->validateInput($_REQUEST['db_username']);
|
||||
$db_password = $filter->validateInput($_REQUEST['db_password']);
|
||||
$db_port = $filter->validateInput($_REQUEST['db_port']);
|
||||
if($db_port != "3306"){
|
||||
$db_hostname = $db_hostname.":".$db_port;
|
||||
}
|
||||
$link = @mysql_connect( $db_hostname, $db_username, $db_password );
|
||||
$wfDatabase = $filter->validateInput($_REQUEST['wfDatabase'], 'nosql');
|
||||
$query = "show databases like '%s' ";
|
||||
|
||||
@@ -61343,4 +61343,7 @@ INSERT INTO ADDONS_MANAGER (ADDON_DESCRIPTION,ADDON_ID,ADDON_NAME,ADDON_NICK,ADD
|
||||
('Enables the multiple email configuration feature.','multipleEmailServers','multipleEmailServers','multipleEmailServers','Colosa','localRegistry','ready','00000000000000000000000000010009','features','','','0'),
|
||||
('Enables the mobile fields.','mobileFields','mobileFields','mobileFields','Colosa','localRegistry','ready','00000000000000000000000000010008','features','','','0'),
|
||||
('This plugin will synchronize ProcessMaker with an LDAP or Active Directory server for user authentication.','ldapAdvanced','ldapAdvanced','ldapAdvanced','Colosa','localRegistry','ready','00000000000000000000000000010010','features','','','0'),
|
||||
('SSO with an LDAP provider.','windowsSSO','windowsSSO','windowsSSO','Colosa','localRegistry','ready','00000000000000000000000000010011','features','','','0');
|
||||
('SSO with an LDAP provider.','windowsSSO','windowsSSO','windowsSSO','Colosa','localRegistry','ready','00000000000000000000000000010011','features','','','0'),
|
||||
('Integration with Gmail','pmGmail','pmGmail','pmGmail','Colosa','localRegistry','ready','00000000000000000000000000010012','features','','','0'),
|
||||
('User-based Language Management.','userBasedLanguage','userBasedLanguage','userBasedLanguage','Colosa','localRegistry','ready','00000000000000000000000000010013','features','','','0'),
|
||||
('User-based Time Zone Management.','userBasedTimeZone','userBasedTimeZone','userBasedTimeZone','Colosa','localRegistry','ready','00000000000000000000000000010014','features','','','0');
|
||||
|
||||
@@ -66,6 +66,18 @@ $(window).load(function () {
|
||||
var data = jsondata;
|
||||
window.project = new PMDynaform.core.Project({
|
||||
data: data,
|
||||
onBeforePrintHandler : function () {
|
||||
var nodeClone = $(".pmdynaform-container").clone();
|
||||
nodeClone.addClass("printing-form");
|
||||
$("body").children().hide();
|
||||
$("body").append(nodeClone );
|
||||
},
|
||||
onAfterPrintHandler : function () {
|
||||
var nodeClone;
|
||||
nodeClone = $(".printing-form");
|
||||
nodeClone.remove();
|
||||
$("body").children().show();
|
||||
},
|
||||
formAjax: loadAjaxParams(),
|
||||
keys: {
|
||||
server: location.host,
|
||||
|
||||
@@ -173,7 +173,6 @@ $oHeadPublisher->assign( 'readerFields', $readerFields ); //sending the fields t
|
||||
$oHeadPublisher->assign( 'reassignColumns', $reassignColumns ); //sending the columns to display in grid
|
||||
$oHeadPublisher->assign( 'action', $action ); //sending the action to make
|
||||
$oHeadPublisher->assign( 'urlProxy', $urlProxy ); //sending the urlProxy to make
|
||||
$oHeadPublisher->assign( 'caseListBuilder', $caseListBuilder ); //sending the caseListBuilder
|
||||
$oHeadPublisher->assign( 'PMDateFormat', $dateFormat ); //sending the fields to get from proxy
|
||||
$oHeadPublisher->assign( 'statusValues', $status ); //Sending the listing of status
|
||||
$oHeadPublisher->assign( 'processValues', $processes ); //Sending the listing of processes
|
||||
|
||||
@@ -62,11 +62,11 @@ if ((isset( $_FILES['form'] )) && ($_FILES['form']['error']['APP_DOC_FILENAME']
|
||||
G::LoadClass("case");
|
||||
|
||||
$inputDocumentUid = $_GET["UID"]; //$_POST["form"]["DOC_UID"]
|
||||
$appDocUid = $_POST["form"]["APP_DOC_UID"];
|
||||
$docVersion = intval($_POST["form"]["docVersion"]);
|
||||
$appDocType = $_POST["form"]["APP_DOC_TYPE"];
|
||||
$appDocUid = (isset($_POST["form"]["APP_DOC_UID"]))? $_POST["form"]["APP_DOC_UID"] : "";
|
||||
$docVersion = (isset($_POST["form"]["docVersion"]))? intval($_POST["form"]["docVersion"]) : "";
|
||||
$appDocType = (isset($_POST["form"]["APP_DOC_TYPE"]))? $_POST["form"]["APP_DOC_TYPE"] : "";
|
||||
$appDocComment = (isset($_POST["form"]["APP_DOC_COMMENT"]))? $_POST["form"]["APP_DOC_COMMENT"] : "";
|
||||
$actionType = $_POST["form"]["actionType"];
|
||||
$actionType = (isset($_POST["form"]["actionType"]))? $_POST["form"]["actionType"] : "";
|
||||
|
||||
$case = new Cases();
|
||||
$case->thisIsTheCurrentUser($_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["USER_LOGGED"], "REDIRECT", "casesListExtJs");
|
||||
@@ -96,7 +96,14 @@ if ($_SESSION["TRIGGER_DEBUG"]["NUM_TRIGGERS"] > 0) {
|
||||
//***Validating the file allowed extensions***
|
||||
$oInputDocument = new InputDocument();
|
||||
$InpDocData = $oInputDocument->load( $inputDocumentUid );
|
||||
$res = G::verifyInputDocExtension($InpDocData['INP_DOC_TYPE_FILE'], $_FILES["form"]["name"]["APP_DOC_FILENAME"], $_FILES["form"]["tmp_name"]["APP_DOC_FILENAME"]);
|
||||
|
||||
if(isset($_FILES["form"]["name"]["APP_DOC_FILENAME"]) && isset($_FILES["form"]["tmp_name"]["APP_DOC_FILENAME"])){
|
||||
$res = G::verifyInputDocExtension($InpDocData['INP_DOC_TYPE_FILE'], $_FILES["form"]["name"]["APP_DOC_FILENAME"], $_FILES["form"]["tmp_name"]["APP_DOC_FILENAME"]);
|
||||
}else{
|
||||
$res = new stdclass();
|
||||
$res->status = false;
|
||||
$res->message = G::LoadTranslation('ID_UPLOAD_ERR_INI_SIZE' );
|
||||
}
|
||||
if($res->status == 0){
|
||||
$message = $res->message;
|
||||
G::SendMessageText( $message, "ERROR" );
|
||||
|
||||
@@ -24,6 +24,7 @@ $filter = isset( $_REQUEST["filter"] ) ? $_REQUEST["filter"] : "";
|
||||
$process = isset( $_REQUEST["process"] ) ? $_REQUEST["process"] : "";
|
||||
$category = isset( $_REQUEST["category"] ) ? $_REQUEST["category"] : "";
|
||||
$status = isset( $_REQUEST["status"] ) ? strtoupper( $_REQUEST["status"] ) : "";
|
||||
$filterStatus = isset( $_REQUEST["filterStatus"] ) ? strtoupper( $_REQUEST["filterStatus"] ) : "";
|
||||
$user = isset( $_REQUEST["user"] ) ? $_REQUEST["user"] : "";
|
||||
$search = isset( $_REQUEST["search"] ) ? $_REQUEST["search"] : "";
|
||||
$action = isset( $_GET["action"] ) ? $_GET["action"] : (isset( $_REQUEST["action"] ) ? $_REQUEST["action"] : "todo");
|
||||
@@ -118,7 +119,7 @@ try {
|
||||
$filter,
|
||||
$search,
|
||||
$process,
|
||||
$status,
|
||||
$filterStatus,
|
||||
$type,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
|
||||
@@ -27,7 +27,7 @@ try {
|
||||
|
||||
$filters['start'] = isset( $_REQUEST["start"] ) ? $_REQUEST["start"] : "0";
|
||||
$filters['limit'] = isset( $_REQUEST["limit"] ) ? $_REQUEST["limit"] : "25";
|
||||
$filters['sort'] = isset( $_REQUEST["sort"] ) ? $_REQUEST["sort"] : "";
|
||||
$filters['sort'] = (isset($_REQUEST['sort']))? (($_REQUEST['sort'] == 'APP_STATUS_LABEL')? 'APP_STATUS' : $_REQUEST['sort']) : '';
|
||||
$filters['dir'] = isset( $_REQUEST["dir"] ) ? $_REQUEST["dir"] : "DESC";
|
||||
|
||||
$filters['action'] = isset( $_REQUEST["action"] ) ? $_REQUEST["action"] : "";
|
||||
|
||||
@@ -181,11 +181,15 @@ try {
|
||||
$_SESSION['USR_USERNAME'] = $usr;
|
||||
}
|
||||
|
||||
//Update User Time Zone
|
||||
if (isset($_POST['form']['BROWSER_TIME_ZONE'])) {
|
||||
$user = new Users();
|
||||
$user->update(['USR_UID' => $_SESSION['USER_LOGGED'], 'USR_TIME_ZONE' => $_POST['form']['BROWSER_TIME_ZONE']]);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) {
|
||||
//Update User Time Zone
|
||||
if (isset($_POST['form']['BROWSER_TIME_ZONE'])) {
|
||||
$user = new Users();
|
||||
$user->update(['USR_UID' => $_SESSION['USER_LOGGED'], 'USR_TIME_ZONE' => $_POST['form']['BROWSER_TIME_ZONE']]);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Set User Time Zone
|
||||
$user = UsersPeer::retrieveByPK($_SESSION['USER_LOGGED']);
|
||||
@@ -202,27 +206,31 @@ try {
|
||||
$_SESSION['USR_TIME_ZONE'] = $userTimeZone;
|
||||
}
|
||||
|
||||
if (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) {
|
||||
$dateTime = new \ProcessMaker\Util\DateTime();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) {
|
||||
if (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) {
|
||||
$dateTime = new \ProcessMaker\Util\DateTime();
|
||||
|
||||
$timeZoneOffset = $dateTime->getTimeZoneOffsetByTimeZoneId($_SESSION['USR_TIME_ZONE']);
|
||||
$timeZoneOffset = $dateTime->getTimeZoneOffsetByTimeZoneId($_SESSION['USR_TIME_ZONE']);
|
||||
|
||||
if ($timeZoneOffset === false || $timeZoneOffset != (int)($_POST['form']['BROWSER_TIME_ZONE_OFFSET'])) {
|
||||
$_SESSION['__TIME_ZONE_FAILED__'] = true;
|
||||
$_SESSION['USR_USERNAME'] = $usr;
|
||||
$_SESSION['USR_PASSWORD'] = $pwd;
|
||||
if ($timeZoneOffset === false || $timeZoneOffset != (int)($_POST['form']['BROWSER_TIME_ZONE_OFFSET'])) {
|
||||
$_SESSION['__TIME_ZONE_FAILED__'] = true;
|
||||
$_SESSION['USR_USERNAME'] = $usr;
|
||||
$_SESSION['USR_PASSWORD'] = $pwd;
|
||||
|
||||
$_SESSION['BROWSER_TIME_ZONE'] = $dateTime->getTimeZoneIdByTimeZoneOffset((int)($_POST['form']['BROWSER_TIME_ZONE_OFFSET']), false);
|
||||
$_SESSION['BROWSER_TIME_ZONE'] = $dateTime->getTimeZoneIdByTimeZoneOffset((int)($_POST['form']['BROWSER_TIME_ZONE_OFFSET']), false);
|
||||
|
||||
if (strpos($_SERVER['HTTP_REFERER'], 'home/login') !== false) {
|
||||
$d = serialize(['u' => $usr, 'p' => $pwd, 'm' => '', 'timeZoneFailed' => 1, 'userTimeZone' => $_SESSION['USR_TIME_ZONE'], 'browserTimeZone' => $_SESSION['BROWSER_TIME_ZONE']]);
|
||||
$urlLogin = $urlLogin . '?d=' . base64_encode($d);
|
||||
if (strpos($_SERVER['HTTP_REFERER'], 'home/login') !== false) {
|
||||
$d = serialize(['u' => $usr, 'p' => $pwd, 'm' => '', 'timeZoneFailed' => 1, 'userTimeZone' => $_SESSION['USR_TIME_ZONE'], 'browserTimeZone' => $_SESSION['BROWSER_TIME_ZONE']]);
|
||||
$urlLogin = $urlLogin . '?d=' . base64_encode($d);
|
||||
}
|
||||
|
||||
G::header('Location: ' . $urlLogin);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
G::header('Location: ' . $urlLogin);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Set data
|
||||
$aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']);
|
||||
|
||||
@@ -139,6 +139,7 @@ if (isset ($_SESSION['USER_LOGGED'])) {
|
||||
}
|
||||
//end log
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$timeZoneFailed = false;
|
||||
|
||||
if (isset($_SESSION['__TIME_ZONE_FAILED__']) && $_SESSION['__TIME_ZONE_FAILED__']) {
|
||||
@@ -148,6 +149,7 @@ if (isset($_SESSION['__TIME_ZONE_FAILED__']) && $_SESSION['__TIME_ZONE_FAILED__'
|
||||
$userTimeZone = $_SESSION['USR_TIME_ZONE'];
|
||||
$browserTimeZone = $_SESSION['BROWSER_TIME_ZONE'];
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//start new session
|
||||
@session_destroy();
|
||||
@@ -191,7 +193,6 @@ if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc1
|
||||
G::RenderPage('publish');
|
||||
die();
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($timeZoneFailed) {
|
||||
$dateTime = new \ProcessMaker\Util\DateTime();
|
||||
@@ -205,14 +206,14 @@ if ($timeZoneFailed) {
|
||||
$arrayTimeZoneId = $dateTime->getTimeZoneIdByTimeZoneOffset($browserTimeZoneOffset);
|
||||
|
||||
array_unshift($arrayTimeZoneId, 'false');
|
||||
array_walk($arrayTimeZoneId, function (&$value, $key, $parameter) { $value = ['TZ_UID' => $value, 'TZ_NAME' => '(UTC' . $parameter . ') ' . $value]; }, $browserUtcOffset);
|
||||
array_walk($arrayTimeZoneId, function (&$value, $key, $parameter) { $value = ['TZ_UID' => $value, 'TZ_NAME' => '(UTC ' . $parameter . ') ' . $value]; }, $browserUtcOffset);
|
||||
|
||||
$_SESSION['_DBArray'] = ['TIME_ZONE' => $arrayTimeZoneId];
|
||||
|
||||
$arrayData = [
|
||||
'USR_USERNAME' => $userUsername,
|
||||
'USR_PASSWORD' => $userPassword,
|
||||
'USR_TIME_ZONE' => '(UTC' . $userUtcOffset . ') ' . $userTimeZone,
|
||||
'USR_TIME_ZONE' => '(UTC ' . $userUtcOffset . ') ' . $userTimeZone,
|
||||
'BROWSER_TIME_ZONE' => $browserTimeZone
|
||||
];
|
||||
|
||||
@@ -222,6 +223,7 @@ if ($timeZoneFailed) {
|
||||
G::RenderPage('publish');
|
||||
exit(0);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//translation
|
||||
//$Translations = G::getModel("Translation");
|
||||
|
||||
@@ -23,8 +23,9 @@ if (file_exists(PATH_DATA . "cron")) {
|
||||
//Get data of cron file
|
||||
$arrayCron = unserialize(trim(file_get_contents(PATH_DATA . "cron")));
|
||||
|
||||
$bCronIsRunning = (boolean)($arrayCron["bCronIsRunning"]);
|
||||
$sLastExecution = $arrayCron["sLastExecution"];
|
||||
$bCronIsRunning = (isset($arrayCron['bCronIsRunning']))? (bool)($arrayCron['bCronIsRunning']) : ((isset($arrayCron['flagIsRunning']))? (bool)($arrayCron['flagIsRunning']) : false);
|
||||
$sLastExecution = (isset($arrayCron['sLastExecution']))? $arrayCron['sLastExecution'] : ((isset($arrayCron['lastExecution']))? $arrayCron['lastExecution'] : '');
|
||||
|
||||
$processcTimeProcess = (isset($arrayCron["processcTimeProcess"]))? (int)($arrayCron["processcTimeProcess"]) : 10; //Minutes
|
||||
$processcTimeStart = (isset($arrayCron["processcTimeStart"]))? $arrayCron["processcTimeStart"] : 0;
|
||||
}
|
||||
@@ -88,4 +89,3 @@ $oHeadPublisher->assign( "CRON", $cronInfo );
|
||||
$oHeadPublisher->assign( "STATUS", $arrayStatus );
|
||||
|
||||
G::RenderPage( "publish", "extJs" );
|
||||
|
||||
|
||||
@@ -17,16 +17,26 @@ if ($postMaxSize < $uploadMaxSize) {
|
||||
$uploadMaxSize = $postMaxSize;
|
||||
}
|
||||
|
||||
$languageManagement = 0;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
|
||||
$languageManagement = 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->assign( 'USR_UID', '' );
|
||||
$oHeadPublisher->assign( 'MODE', $_GET['MODE'] );
|
||||
$oHeadPublisher->assign( 'MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ' );
|
||||
$oHeadPublisher->assign('USR_UID', '');
|
||||
$oHeadPublisher->assign('MODE', $_GET['MODE']);
|
||||
$oHeadPublisher->assign('MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ');
|
||||
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
|
||||
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
|
||||
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
||||
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
|
||||
@@ -94,9 +94,6 @@
|
||||
<img src="/images/logopm3.png" class="img-responsive" alt="Conxole Admin">
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading text-center">
|
||||
<p>Please enter your credentials below</p>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{php}
|
||||
global $G_TEMPLATE;
|
||||
|
||||
@@ -69,8 +69,10 @@ class EmailEvent
|
||||
$aRow['EMAIL'] = $aRow['MESS_ACCOUNT'];
|
||||
} else {
|
||||
$aRow['EMAIL'] = $aRow['MESS_FROM_MAIL'];
|
||||
}
|
||||
if($aRow['EMAIL'] != "") {
|
||||
$accountsArray[] = array_change_key_case($aRow, CASE_LOWER);
|
||||
}
|
||||
$accountsArray[] = array_change_key_case($aRow, CASE_LOWER);
|
||||
}
|
||||
$result->next();
|
||||
}
|
||||
|
||||
@@ -490,6 +490,7 @@ class Light
|
||||
case '': //when this task is the Finish process
|
||||
case 'nobody':
|
||||
$userFields = $oDerivation->getUsersFullNameFromArray( $derive[$sKey]['USER_UID'] );
|
||||
$taskAss = array();
|
||||
$taskAss['routeFinishFlag'] = true;
|
||||
$user['userId'] = $derive[$sKey]['USER_UID'];
|
||||
$user['userFullName'] = $userFields['USR_FULLNAME'];
|
||||
|
||||
@@ -880,6 +880,9 @@ class Variable
|
||||
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_UID);
|
||||
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_NAME);
|
||||
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_FIELD_TYPE);
|
||||
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_DBCONNECTION);
|
||||
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_SQL);
|
||||
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_ACCEPTED_VALUES);
|
||||
$criteria->add(\ProcessVariablesPeer::VAR_NAME, $variableName);
|
||||
$criteria->add(\ProcessVariablesPeer::PRJ_UID, $processUid);
|
||||
$rsCriteria = \ProcessVariablesPeer::doSelectRS($criteria);
|
||||
|
||||
@@ -660,8 +660,9 @@ class Bpmn extends Handler
|
||||
$arrayEventType = array("START", "END", "INTERMEDIATE");
|
||||
|
||||
$arrayAux = array(
|
||||
array("eventUid" => $bpmnFlow["FLO_ELEMENT_ORIGIN"], "eventMarker" => "MESSAGETHROW"),
|
||||
array("eventUid" => $bpmnFlow["FLO_ELEMENT_DEST"], "eventMarker" => "MESSAGECATCH")
|
||||
array("eventUid" => $bpmnFlow["FLO_ELEMENT_ORIGIN"], "eventMarker" => array("MESSAGETHROW",
|
||||
"EMAIL")),
|
||||
array("eventUid" => $bpmnFlow["FLO_ELEMENT_DEST"], "eventMarker" => array("MESSAGECATCH"))
|
||||
);
|
||||
|
||||
foreach ($arrayAux as $value) {
|
||||
@@ -670,7 +671,7 @@ class Bpmn extends Handler
|
||||
$criteria->addSelectColumn(\BpmnEventPeer::EVN_UID);
|
||||
$criteria->add(\BpmnEventPeer::EVN_UID, $value["eventUid"], \Criteria::EQUAL);
|
||||
$criteria->add(\BpmnEventPeer::EVN_TYPE, $arrayEventType, \Criteria::IN);
|
||||
$criteria->add(\BpmnEventPeer::EVN_MARKER, $value["eventMarker"], \Criteria::EQUAL);
|
||||
$criteria->add(\BpmnEventPeer::EVN_MARKER, $value["eventMarker"], \Criteria::IN);
|
||||
|
||||
$rsCriteria = \BpmnEventPeer::doSelectRS($criteria);
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ function openCase(){
|
||||
if(casesNewTab) {
|
||||
casesNewTab.close();
|
||||
}
|
||||
casesNewTab = window.open(requestFile + '?' + params);
|
||||
casesNewTab = window.open(requestFile + '?' + params);
|
||||
} else {
|
||||
redirect(requestFile + '?' + params);
|
||||
}
|
||||
@@ -748,21 +748,12 @@ Ext.onReady ( function() {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Create HttpProxy instance, all CRUD requests will be directed to single proxy url.
|
||||
if (caseListBuilder) {
|
||||
var proxyCasesList = new Ext.data.HttpProxy({
|
||||
api: {
|
||||
read : urlProxy
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var proxyCasesList = new Ext.data.HttpProxy({
|
||||
api: {
|
||||
read : urlProxy
|
||||
}
|
||||
});
|
||||
}
|
||||
var proxyCasesList = new Ext.data.HttpProxy({
|
||||
api: {
|
||||
read : urlProxy
|
||||
}
|
||||
});
|
||||
|
||||
// Typical JsonReader with additional meta-data params for defining the core attributes of your json-response
|
||||
// the readerFields is defined in PHP server side
|
||||
@@ -2486,4 +2477,4 @@ Ext.EventManager.on(window, 'beforeunload', function () {
|
||||
if(casesNewTab) {
|
||||
casesNewTab.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -26,10 +26,7 @@
|
||||
<script type="text/javascript">
|
||||
function getBrowserTimeZoneOffset()
|
||||
{
|
||||
var d = new Date();
|
||||
var tzOffset = d.getTimezoneOffset();
|
||||
|
||||
return ((tzOffset > 0)? "-" : "") + (tzOffset * 60);
|
||||
return -1 * ((new Date()).getTimezoneOffset() * 60);
|
||||
}
|
||||
|
||||
function stringReplace(strSearch, strReplace, str)
|
||||
|
||||
@@ -57,10 +57,7 @@
|
||||
|
||||
function getBrowserTimeZoneOffset()
|
||||
{
|
||||
var d = new Date();
|
||||
var tzOffset = d.getTimezoneOffset();
|
||||
|
||||
return ((tzOffset > 0)? "-" : "") + (tzOffset * 60);
|
||||
return -1 * ((new Date()).getTimezoneOffset() * 60);
|
||||
}
|
||||
|
||||
function stringReplace(strSearch, strReplace, str)
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
{$form.JS}
|
||||
</script>
|
||||
|
||||
<div class="panel-default">
|
||||
<p>{php}echo G::LoadTranslation('ID_TIME_ZONE_LOGIN_TITLE');{/php}</p>
|
||||
</div>
|
||||
|
||||
<form id="{$form_id}" method="post" enctype="multipart/form-data" action="{$form_action}" class="form-signin" style="margin:0px;" accept-charset="UTF-8" role="form">
|
||||
{$form.BROWSER_TIME_ZONE_OFFSET}
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<div class="panel-default">
|
||||
<p>{php}echo G::LoadTranslation('ID_LICENCE_LOGIN_TITLE');{/php}</p>
|
||||
</div>
|
||||
|
||||
<form accept-charset="UTF-8" role="form" class="form-signin" id="{$form_id}" name="{$form_name}" action="{$form_action}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit="return validateForm('{$form_objectRequiredFields}');">
|
||||
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="{$form_objectRequiredFields}" />
|
||||
<input type="hidden" name="DynaformRequiredFields" id="DynaformRequiredFields" value="{$form_objectRequiredFields}" />
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<div class="panel-default">
|
||||
<p>{php}echo G::LoadTranslation('ID_LOGIN_TITLE');{/php}</p>
|
||||
</div>
|
||||
|
||||
<form accept-charset="UTF-8" role="form" class="form-signin"
|
||||
id="{$form_id}" name="{$form_name}" action="{$form_action}" method="post" encType="multipart/form-data" onsubmit="return validateForm('{$form_objectRequiredFields}');">
|
||||
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="{$form_objectRequiredFields}" />
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<div class="panel-default">
|
||||
<p>{php}echo G::LoadTranslation('ID_LOGIN_TITLE');{/php}</p>
|
||||
</div>
|
||||
|
||||
<form accept-charset="UTF-8" role="form" class="form-signin" id="{$form_id}" name="{$form_name}" action="{$form_action}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit="return validateForm('{$form_objectRequiredFields}');">
|
||||
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="{$form_objectRequiredFields}" />
|
||||
<input type="hidden" name="DynaformRequiredFields" id="DynaformRequiredFields" value="{$form_objectRequiredFields}" />
|
||||
|
||||
@@ -303,12 +303,6 @@ if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 ||
|
||||
}
|
||||
session_start();
|
||||
|
||||
$_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int)($config['system_utc_time_zone']) == 1;
|
||||
|
||||
$_GET = \ProcessMaker\Util\DateTime::convertDataToUtc($_GET);
|
||||
$_POST = \ProcessMaker\Util\DateTime::convertDataToUtc($_POST);
|
||||
$_REQUEST = \ProcessMaker\Util\DateTime::convertDataToUtc($_REQUEST);
|
||||
|
||||
//$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
||||
//$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
||||
//$e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE;
|
||||
@@ -329,7 +323,7 @@ ini_set( 'short_open_tag', 'On' );
|
||||
ini_set( 'default_charset', "UTF-8" );
|
||||
ini_set( 'memory_limit', $config['memory_limit'] );
|
||||
ini_set( 'soap.wsdl_cache_enabled', $config['wsdl_cache'] );
|
||||
ini_set('date.timezone', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 'UTC' : $config['time_zone']); //Set Time Zone
|
||||
ini_set('date.timezone', $config['time_zone']); //Set Time Zone
|
||||
|
||||
define( 'DEBUG_SQL_LOG', $config['debug_sql'] );
|
||||
define( 'DEBUG_SQL', $config['debug'] );
|
||||
@@ -337,7 +331,6 @@ define( 'DEBUG_TIME_LOG', $config['debug_time'] );
|
||||
define( 'DEBUG_CALENDAR_LOG', $config['debug_calendar'] );
|
||||
define( 'MEMCACHED_ENABLED', $config['memcached'] );
|
||||
define( 'MEMCACHED_SERVER', $config['memcached_server'] );
|
||||
define('TIME_ZONE', ini_get('date.timezone'));
|
||||
|
||||
define ('WS_IN_LOGIN', isset($config['WS_IN_LOGIN']) ? $config['WS_IN_LOGIN'] : 'serverconf');
|
||||
|
||||
@@ -691,6 +684,23 @@ if (defined( 'DEBUG_SQL_LOG' ) && DEBUG_SQL_LOG) {
|
||||
Propel::init( PATH_CORE . "config/databases.php" );
|
||||
}
|
||||
|
||||
//Set Time Zone
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) {
|
||||
$_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int)($config['system_utc_time_zone']) == 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
ini_set('date.timezone', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 'UTC' : $config['time_zone']); //Set Time Zone
|
||||
|
||||
define('TIME_ZONE', ini_get('date.timezone'));
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$_GET = \ProcessMaker\Util\DateTime::convertDataToUtc($_GET);
|
||||
$_POST = \ProcessMaker\Util\DateTime::convertDataToUtc($_POST);
|
||||
$_REQUEST = \ProcessMaker\Util\DateTime::convertDataToUtc($_REQUEST);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
Creole::registerDriver( 'dbarray', 'creole.contrib.DBArrayConnection' );
|
||||
|
||||
// Session Initializations
|
||||
|
||||
Reference in New Issue
Block a user