conflicts
This commit is contained in:
@@ -378,6 +378,7 @@ class WebApplication
|
||||
}
|
||||
|
||||
Services\OAuth2\Server::setWorkspace(SYS_SYS);
|
||||
Services\OAuth2\Server::loadPostEnvironment();
|
||||
$this->rest->addAPIClass('\ProcessMaker\\Services\\OAuth2\\Server', 'oauth2');
|
||||
|
||||
return $uri;
|
||||
|
||||
@@ -1150,7 +1150,13 @@ class Bootstrap
|
||||
$xmlConfiguration = file_get_contents($configurationFile);
|
||||
$xmlConfigurationObj = Bootstrap::xmlParser($xmlConfiguration);
|
||||
|
||||
if (!isset($xmlConfigurationObj->result['skinConfiguration']['__CONTENT__']['cssFiles']['__CONTENT__'][$skinVariant]['__CONTENT__'])) {
|
||||
$xmlConfigurationObj->result['skinConfiguration']['__CONTENT__']['cssFiles']['__CONTENT__'][$skinVariant]['__CONTENT__'] = array('cssFile' => array());
|
||||
}
|
||||
$skinFilesArray = $xmlConfigurationObj->result['skinConfiguration']['__CONTENT__']['cssFiles']['__CONTENT__'][$skinVariant]['__CONTENT__']['cssFile'];
|
||||
if (isset($skinFilesArray['__ATTRIBUTES__'])) {
|
||||
$skinFilesArray = array($skinFilesArray);
|
||||
}
|
||||
foreach ($skinFilesArray as $keyFile => $cssFileInfo) {
|
||||
$enabledBrowsers = explode(",", $cssFileInfo['__ATTRIBUTES__']['enabledBrowsers']);
|
||||
$disabledBrowsers = explode(",", $cssFileInfo['__ATTRIBUTES__']['disabledBrowsers']);
|
||||
|
||||
@@ -58,13 +58,12 @@ class actionsByEmailCoreClass extends PMPlugin
|
||||
}
|
||||
|
||||
if ($data->USR_UID == '') {
|
||||
throw new Exception('The parameter $data->USR_UID is empty.');
|
||||
error_log('The parameter $data->USR_UID is empty, the routed task may be a self-service type, actions by email does not work with self-service task types.', 0);
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
echo $e->getMessage().' Please contact to your system administrator.';
|
||||
die;
|
||||
}
|
||||
|
||||
G::LoadClass('pmFunctions');
|
||||
|
||||
$emailSetup = getEmailConfiguration();
|
||||
@@ -86,6 +85,7 @@ class actionsByEmailCoreClass extends PMPlugin
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_EMAIL_FIELD);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_ACTION_FIELD);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_SUBJECT_FIELD);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT);
|
||||
$criteria->addSelectColumn(DynaformPeer::DYN_CONTENT);
|
||||
$criteria->addJoin( AbeConfigurationPeer::DYN_UID, DynaformPeer::DYN_UID, Criteria::LEFT_JOIN );
|
||||
$criteria->add(AbeConfigurationPeer::PRO_UID, $caseFields['PRO_UID']);
|
||||
@@ -233,7 +233,16 @@ class actionsByEmailCoreClass extends PMPlugin
|
||||
|
||||
$user = new Users();
|
||||
$userDetails = $user->loadDetails($data->PREVIOUS_USR_UID);
|
||||
$emailFrom = $userDetails["USR_EMAIL"];
|
||||
|
||||
if($configuration['ABE_MAILSERVER_OR_MAILCURRENT'] == 1 && $configuration['ABE_TYPE'] !== ''){
|
||||
$emailFrom = ($userDetails["USR_FULLNAME"] . ' <' . $userDetails["USR_EMAIL"] . '>');
|
||||
}else{
|
||||
if(isset($emailSetup["MESS_FROM_NAME"]) && isset($emailSetup["MESS_FROM_MAIL"] )){
|
||||
$emailFrom = ($emailSetup["MESS_FROM_NAME"] . ' <' . $emailSetup["MESS_FROM_MAIL"] . '>');
|
||||
}else{
|
||||
$emailFrom = ((isset($emailSetup["MESS_FROM_NAME"])) ? $emailSetup["MESS_FROM_NAME"] : $emailSetup["MESS_FROM_MAIL"]);
|
||||
}
|
||||
}
|
||||
|
||||
G::LoadClass('wsBase');
|
||||
|
||||
|
||||
@@ -493,14 +493,15 @@ class Cases
|
||||
}
|
||||
|
||||
if ($APP_UID != '') {
|
||||
$taskInstance = new Task();
|
||||
$task = new Task();
|
||||
$arrayTaskData = $task->load($TAS_UID);
|
||||
|
||||
$taskData = $taskInstance->Load($TAS_UID);
|
||||
$tasGroupVariable = str_replace(array('@', '#'), '', $taskData['TAS_GROUP_VARIABLE']);
|
||||
$caseData = $this->LoadCase($APP_UID);
|
||||
$taskGroupVariable = trim($arrayTaskData["TAS_GROUP_VARIABLE"], " @#");
|
||||
|
||||
if (isset($caseData['APP_DATA'][$tasGroupVariable])) {
|
||||
$dataVariable = $caseData["APP_DATA"][$tasGroupVariable];
|
||||
$caseData = $this->loadCase($APP_UID);
|
||||
|
||||
if (isset($caseData["APP_DATA"][$taskGroupVariable])) {
|
||||
$dataVariable = $caseData["APP_DATA"][$taskGroupVariable];
|
||||
|
||||
if (is_array($dataVariable)) {
|
||||
//UIDs of Users
|
||||
@@ -515,6 +516,11 @@ class Cases
|
||||
|
||||
if (!empty($dataVariable) && in_array($dataVariable, $group->getActiveGroupsForAnUser($USR_UID))) {
|
||||
return true;
|
||||
} else {
|
||||
//UID of User
|
||||
if (!empty($dataVariable) && $dataVariable == $USR_UID) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2377,7 +2383,6 @@ class Cases
|
||||
|
||||
public function getNextSupervisorStep($sProcessUID, $iPosition, $sType = 'DYNAFORM')
|
||||
{
|
||||
$iPosition += 1;
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->add(StepSupervisorPeer::PRO_UID, $sProcessUID);
|
||||
$oCriteria->add(StepSupervisorPeer::STEP_TYPE_OBJ, $sType);
|
||||
@@ -2390,7 +2395,7 @@ class Cases
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->add(StepSupervisorPeer::PRO_UID, $sProcessUID);
|
||||
$oCriteria->add(StepSupervisorPeer::STEP_TYPE_OBJ, $sType);
|
||||
$oCriteria->add(StepSupervisorPeer::STEP_POSITION, 1);
|
||||
$oCriteria->add(StepSupervisorPeer::STEP_POSITION, ($iPosition+1));
|
||||
$oDataset = StepSupervisorPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
@@ -317,6 +317,11 @@ class PMPluginRegistry
|
||||
if (method_exists( $detail, "disable" )) {
|
||||
$detail->disable();
|
||||
}
|
||||
//flag Only Plugin actionsByEmail
|
||||
if($detail->sNamespace == 'actionsByEmail'){
|
||||
$plugin = new $detail->sClassName( $detail->sNamespace, $detail->sFilename );
|
||||
$plugin->disable();
|
||||
}
|
||||
}
|
||||
|
||||
$sw = true;
|
||||
|
||||
@@ -139,35 +139,13 @@ class pmDynaform
|
||||
}
|
||||
}
|
||||
}
|
||||
//query & options
|
||||
if ($key === "type" && ($value === "text" || $value === "textarea" || $value === "dropdown" || $value === "suggest" || $value === "checkbox" || $value === "checkgroup" || $value === "radio" || $value === "datetime" || $value === "hidden")) {
|
||||
if (!isset($json->data)) {
|
||||
$json->data = array(
|
||||
"value" => "",
|
||||
"label" => ""
|
||||
);
|
||||
}
|
||||
//options & query
|
||||
if ($key === "type" && ($value === "text" || $value === "textarea" || $value === "hidden" || $value === "dropdown" || $value === "checkgroup" || $value === "radio" || $value === "suggest" )) {
|
||||
if (!isset($json->dbConnection))
|
||||
$json->dbConnection = "none";
|
||||
if (!isset($json->sql))
|
||||
$json->sql = "";
|
||||
if (!isset($json->options))
|
||||
$json->options = array();
|
||||
if (!isset($json->optionsSql))
|
||||
$json->optionsSql = array();
|
||||
else {
|
||||
//convert stdClass to array
|
||||
if (is_array($json->options)) {
|
||||
$option = array();
|
||||
foreach ($json->options as $valueOptions) {
|
||||
array_push($option, array(
|
||||
"value" => $valueOptions->value,
|
||||
"label" => isset($valueOptions->label) ? $valueOptions->label : ""
|
||||
));
|
||||
}
|
||||
$json->options = $option;
|
||||
}
|
||||
}
|
||||
if ($json->dbConnection !== "" && $json->dbConnection !== "none" && $json->sql !== "") {
|
||||
$cnn = Propel::getConnection($json->dbConnection);
|
||||
$stmt = $cnn->createStatement();
|
||||
@@ -175,68 +153,151 @@ class pmDynaform
|
||||
$rs = $stmt->executeQuery(G::replaceDataField($json->sql, array()), \ResultSet::FETCHMODE_NUM);
|
||||
while ($rs->next()) {
|
||||
$row = $rs->getRow();
|
||||
$option = array(
|
||||
"label" => isset($row[1]) ? $row[1] : $row[0],
|
||||
"value" => $row[0]
|
||||
);
|
||||
$option = new stdClass();
|
||||
$option->value = $row[0];
|
||||
$option->label = isset($row[1]) ? $row[1] : $row[0];
|
||||
array_push($json->optionsSql, $option);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
if (isset($json->options[0])) {
|
||||
$json->data = $json->options[0];
|
||||
$no = count($json->options);
|
||||
for ($io = 0; $io < $no; $io++) {
|
||||
if ((is_array($json->options[$io]) ? $json->options[$io]["value"] : $json->options[$io]->value) === $json->defaultValue) {
|
||||
$json->data = $json->options[$io];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//data
|
||||
if ($key === "type" && ($value === "text" || $value === "textarea" || $value === "suggest" || $value === "dropdown" || $value === "radio" || $value === "datetime" || $value === "hidden")) {
|
||||
$json->data = array(
|
||||
"value" => isset($this->fields["APP_DATA"][$json->name]) ? $this->fields["APP_DATA"][$json->name] : (is_array($json->data) ? $json->data["value"] : $json->data->value),
|
||||
"label" => isset($this->fields["APP_DATA"][$json->name . "_label"]) ? $this->fields["APP_DATA"][$json->name . "_label"] : (is_array($json->data) ? $json->data["label"] : $json->data->label)
|
||||
);
|
||||
if ($json->data["label"] === "") {
|
||||
$json->data["label"] = $json->data["value"];
|
||||
if ($key === "type" && ($value === "text" || $value === "textarea" || $value === "hidden")) {
|
||||
$json->data = new stdClass();
|
||||
$json->data->value = "";
|
||||
$json->data->label = "";
|
||||
if (isset($json->optionsSql[0])) {
|
||||
$json->data->value = $json->optionsSql[0]->value;
|
||||
$json->data->label = $json->optionsSql[0]->value;
|
||||
}
|
||||
//synchronize var_label
|
||||
if (isset($this->fields["APP_DATA"]["__VAR_CHANGED__"]) &&
|
||||
in_array($json->name, explode(",", $this->fields["APP_DATA"]["__VAR_CHANGED__"]))) {
|
||||
$json->data["label"] = $json->data["value"];
|
||||
foreach ($json->options as $io) {
|
||||
if ($json->data["value"] === $io->value) {
|
||||
$json->data["label"] = $io->label;
|
||||
if ($json->defaultValue !== "") {
|
||||
$json->data->value = $json->defaultValue;
|
||||
$json->data->label = $json->defaultValue;
|
||||
}
|
||||
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->optionsSql as $io) {
|
||||
if ($json->data["value"] === $io["value"]) {
|
||||
$json->data["label"] = $io["label"];
|
||||
if ($key === "type" && ($value === "dropdown")) {
|
||||
$json->data = new stdClass();
|
||||
$json->data->value = "";
|
||||
$json->data->label = "";
|
||||
if ($json->defaultValue !== "") {
|
||||
foreach ($json->optionsSql as $os) {
|
||||
if ($os->value === $json->defaultValue) {
|
||||
$json->data->value = $os->value;
|
||||
$json->data->label = $os->label;
|
||||
}
|
||||
}
|
||||
$_SESSION["TRIGGER_DEBUG"]["DATA"][] = Array(
|
||||
"key" => $json->name . "_label",
|
||||
"value" => $json->data["label"]
|
||||
);
|
||||
foreach ($json->options as $os) {
|
||||
if ($os->value === $json->defaultValue) {
|
||||
$json->data->value = $os->value;
|
||||
$json->data->label = $os->label;
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "checkbox" || $value === "checkgroup")) {
|
||||
$json->data = array(
|
||||
"value" => isset($this->fields["APP_DATA"][$json->name]) ? $this->fields["APP_DATA"][$json->name] : array(),
|
||||
"label" => isset($this->fields["APP_DATA"][$json->name . "_label"]) ? $this->fields["APP_DATA"][$json->name . "_label"] : "[]"
|
||||
);
|
||||
//synchronize var_label
|
||||
if (isset($this->fields["APP_DATA"]["__VAR_CHANGED__"]) &&
|
||||
in_array($json->name, explode(",", $this->fields["APP_DATA"]["__VAR_CHANGED__"]))) {
|
||||
$json->data["label"] = G::json_encode($json->data["value"]);
|
||||
$_SESSION["TRIGGER_DEBUG"]["DATA"][] = Array(
|
||||
"key" => $json->name . "_label",
|
||||
"value" => $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 . "_label"];
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "suggest")) {
|
||||
$json->data = new stdClass();
|
||||
$json->data->value = "";
|
||||
$json->data->label = "";
|
||||
if ($json->defaultValue !== "") {
|
||||
$json->data->value = $json->defaultValue;
|
||||
$json->data->label = $json->defaultValue;
|
||||
foreach ($json->optionsSql as $os) {
|
||||
if ($os->value === $json->defaultValue) {
|
||||
$json->data->value = $os->value;
|
||||
$json->data->label = $os->label;
|
||||
}
|
||||
}
|
||||
foreach ($json->options as $os) {
|
||||
if ($os->value === $json->defaultValue) {
|
||||
$json->data->value = $os->value;
|
||||
$json->data->label = $os->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 . "_label"];
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "radio")) {
|
||||
$json->data = new stdClass();
|
||||
$json->data->value = "";
|
||||
$json->data->label = "";
|
||||
if ($json->defaultValue !== "") {
|
||||
foreach ($json->optionsSql as $os) {
|
||||
if ($os->value === $json->defaultValue) {
|
||||
$json->data->value = $os->value;
|
||||
$json->data->label = $os->label;
|
||||
}
|
||||
}
|
||||
foreach ($json->options as $os) {
|
||||
if ($os->value === $json->defaultValue) {
|
||||
$json->data->value = $os->value;
|
||||
$json->data->label = $os->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 . "_label"];
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "checkbox")) {
|
||||
$json->data = new stdClass();
|
||||
$json->data->value = "";
|
||||
$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];
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "checkgroup")) {
|
||||
$json->data = new stdClass();
|
||||
$json->data->value = "";
|
||||
$json->data->label = "[]";
|
||||
if ($json->defaultValue !== "") {
|
||||
$dataValue = array();
|
||||
$dataLabel = array();
|
||||
$dv = explode("|", $json->defaultValue);
|
||||
foreach ($dv as $idv) {
|
||||
foreach ($json->optionsSql as $os) {
|
||||
if ($os->value === trim($idv)) {
|
||||
array_push($dataValue, $os->value);
|
||||
array_push($dataLabel, $os->label);
|
||||
}
|
||||
}
|
||||
foreach ($json->options as $os) {
|
||||
if ($os->value === trim($idv)) {
|
||||
array_push($dataValue, $os->value);
|
||||
array_push($dataLabel, $os->label);
|
||||
}
|
||||
}
|
||||
}
|
||||
$json->data->value = $dataValue;
|
||||
$json->data->label = G::json_encode($dataLabel);
|
||||
}
|
||||
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 . "_label"];
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "datetime")) {
|
||||
$json->data = new stdClass();
|
||||
$json->data->value = "";
|
||||
$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 . "_label"];
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "file") && isset($this->fields["APP_DATA"]["APPLICATION"])) {
|
||||
@@ -252,10 +313,55 @@ class pmDynaform
|
||||
$row = $rs->getRow();
|
||||
array_push($links, "../cases/cases_ShowDocument?a=" . $row["APP_DOC_UID"] . "&v=" . $row["DOC_VERSION"]);
|
||||
}
|
||||
$json->data = array(
|
||||
"value" => $links,
|
||||
"label" => isset($this->fields["APP_DATA"][$json->name . "_label"]) ? $this->fields["APP_DATA"][$json->name . "_label"] : "[]"
|
||||
);
|
||||
$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"] : "[]";
|
||||
}
|
||||
//synchronize var_label
|
||||
if ($key === "type" && ($value === "dropdown" || $value === "suggest")) {
|
||||
if (isset($this->fields["APP_DATA"]["__VAR_CHANGED__"]) && in_array($json->name, explode(",", $this->fields["APP_DATA"]["__VAR_CHANGED__"]))) {
|
||||
foreach ($json->optionsSql as $io) {
|
||||
if ($json->data->value === $io->value) {
|
||||
$json->data->label = $io->label;
|
||||
}
|
||||
}
|
||||
foreach ($json->options as $io) {
|
||||
if ($json->data->value === $io->value) {
|
||||
$json->data->label = $io->label;
|
||||
}
|
||||
}
|
||||
$_SESSION["TRIGGER_DEBUG"]["DATA"][] = Array("key" => $json->name . "_label", "value" => $json->data->label);
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "checkgroup")) {
|
||||
if (isset($this->fields["APP_DATA"]["__VAR_CHANGED__"]) && in_array($json->name, explode(",", $this->fields["APP_DATA"]["__VAR_CHANGED__"]))) {
|
||||
$dataValue = array();
|
||||
$dataLabel = array();
|
||||
$dv = $this->fields["APP_DATA"][$json->name];
|
||||
foreach ($dv as $idv) {
|
||||
foreach ($json->optionsSql as $os) {
|
||||
if ($os->value === $idv) {
|
||||
array_push($dataValue, $os->value);
|
||||
array_push($dataLabel, $os->label);
|
||||
}
|
||||
}
|
||||
foreach ($json->options as $os) {
|
||||
if ($os->value === $idv) {
|
||||
array_push($dataValue, $os->value);
|
||||
array_push($dataLabel, $os->label);
|
||||
}
|
||||
}
|
||||
}
|
||||
$json->data->value = $dataValue;
|
||||
$json->data->label = G::json_encode($dataLabel);
|
||||
$_SESSION["TRIGGER_DEBUG"]["DATA"][] = Array("key" => $json->name . "_label", "value" => $json->data->label);
|
||||
}
|
||||
}
|
||||
if ($key === "type" && ($value === "datetime")) {
|
||||
if (isset($this->fields["APP_DATA"]["__VAR_CHANGED__"]) && in_array($json->name, explode(",", $this->fields["APP_DATA"]["__VAR_CHANGED__"]))) {
|
||||
$json->data->label = $json->data->value;
|
||||
$_SESSION["TRIGGER_DEBUG"]["DATA"][] = Array("key" => $json->name . "_label", "value" => $json->data->label);
|
||||
}
|
||||
}
|
||||
//grid
|
||||
if ($key === "type" && ($value === "grid")) {
|
||||
@@ -378,7 +484,7 @@ class pmDynaform
|
||||
|
||||
$file = file_get_contents(PATH_HOME . "public_html" . PATH_SEP . "lib" . PATH_SEP . "pmdynaform" . PATH_SEP . "build" . PATH_SEP . "pmdynaform.html");
|
||||
$file = str_replace("{javascript}", $javascript, $file);
|
||||
|
||||
$file = str_replace("{sys_skin}", SYS_SKIN, $file);
|
||||
echo $file;
|
||||
exit(0);
|
||||
}
|
||||
@@ -424,6 +530,7 @@ class pmDynaform
|
||||
|
||||
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
|
||||
$file = str_replace("{javascript}", $javascrip, $file);
|
||||
$file = str_replace("{sys_skin}", SYS_SKIN, $file);
|
||||
echo $file;
|
||||
exit();
|
||||
}
|
||||
@@ -471,6 +578,7 @@ class pmDynaform
|
||||
"</div>";
|
||||
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
|
||||
$file = str_replace("{javascript}", $javascrip, $file);
|
||||
$file = str_replace("{sys_skin}", SYS_SKIN, $file);
|
||||
echo $file;
|
||||
exit();
|
||||
}
|
||||
@@ -519,7 +627,7 @@ class pmDynaform
|
||||
|
||||
$file = file_get_contents(PATH_HOME . "public_html" . PATH_SEP . "lib" . PATH_SEP . "pmdynaform" . PATH_SEP . "build" . PATH_SEP . "pmdynaform.html");
|
||||
$file = str_replace("{javascript}", $javascrip, $file);
|
||||
|
||||
$file = str_replace("{sys_skin}", SYS_SKIN, $file);
|
||||
echo $file;
|
||||
exit(0);
|
||||
}
|
||||
@@ -554,6 +662,7 @@ class pmDynaform
|
||||
|
||||
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
|
||||
$file = str_replace("{javascript}", $javascrip, $file);
|
||||
$file = str_replace("{sys_skin}", SYS_SKIN, $file);
|
||||
echo $file;
|
||||
exit();
|
||||
}
|
||||
@@ -587,6 +696,7 @@ class pmDynaform
|
||||
|
||||
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
|
||||
$file = str_replace("{javascript}", $javascrip, $file);
|
||||
$file = str_replace("{sys_skin}", SYS_SKIN, $file);
|
||||
echo $file;
|
||||
exit();
|
||||
}
|
||||
@@ -603,7 +713,7 @@ class pmDynaform
|
||||
|
||||
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
|
||||
$file = str_replace("{javascript}", $javascrip, $file);
|
||||
|
||||
$file = str_replace("{sys_skin}", SYS_SKIN, $file);
|
||||
echo $file;
|
||||
exit();
|
||||
}
|
||||
@@ -633,6 +743,7 @@ class pmDynaform
|
||||
"</div>";
|
||||
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
|
||||
$file = str_replace("{javascript}", $javascrip, $file);
|
||||
$file = str_replace("{sys_skin}", SYS_SKIN, $file);
|
||||
return $file;
|
||||
}
|
||||
|
||||
@@ -1016,4 +1127,3 @@ class pmDynaform
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3331,7 +3331,7 @@ class processMap
|
||||
public function assignSupervisorStep($sProcessUID, $sObjType, $sObjUID)
|
||||
{
|
||||
$oStepSupervisor = new StepSupervisor();
|
||||
$oStepSupervisor->create(array('PRO_UID' => $sProcessUID, 'STEP_TYPE_OBJ' => $sObjType, 'STEP_UID_OBJ' => $sObjUID, 'STEP_POSITION' => $oStepSupervisor->getNextPosition($sProcessUID, $sObjType)));
|
||||
$oStepSupervisor->create(array('PRO_UID' => $sProcessUID, 'STEP_TYPE_OBJ' => $sObjType, 'STEP_UID_OBJ' => $sObjUID, 'STEP_POSITION' => $oStepSupervisor->getNextPositionAll($sProcessUID, $sObjType)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -450,15 +450,14 @@ class spoolRun
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$oPHPMailer->CharSet = "UTF-8";
|
||||
$oPHPMailer->Encoding = "8bit";
|
||||
$oPHPMailer->Host = $this->config['MESS_SERVER'];
|
||||
$oPHPMailer->Port = $this->config['MESS_PORT'];
|
||||
$oPHPMailer->Username = $this->config['MESS_ACCOUNT'];
|
||||
$oPHPMailer->Password = $this->config['MESS_PASSWORD'];
|
||||
$oPHPMailer->From = $this->fileData['from_email'];
|
||||
$oPHPMailer->FromName = utf8_decode( $this->fileData['from_name'] );
|
||||
$oPHPMailer->SetFrom($this->fileData['from_email'], utf8_decode($this->fileData['from_name']));
|
||||
|
||||
if (isset($this->fileData['reply_to'])) {
|
||||
if ($this->fileData['reply_to'] != '') {
|
||||
$oPHPMailer->AddReplyTo($this->fileData['reply_to'], $this->fileData['reply_to_name']);
|
||||
|
||||
@@ -18,7 +18,7 @@ class AbeConfiguration extends BaseAbeConfiguration
|
||||
|
||||
private $filterThisFields = array('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE',
|
||||
'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID','ABE_EMAIL_FIELD',
|
||||
'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE','ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD');
|
||||
'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE','ABE_UPDATE_DATE','ABE_MAILSERVER_OR_MAILCURRENT','ABE_SUBJECT_FIELD');
|
||||
|
||||
public function load($abeUid)
|
||||
{
|
||||
|
||||
@@ -172,15 +172,18 @@ class AppDelegation extends BaseAppDelegation
|
||||
|
||||
// Hook for the trigger PM_CREATE_NEW_DELEGATION
|
||||
if (defined( 'PM_CREATE_NEW_DELEGATION' )) {
|
||||
|
||||
$bpmn = new \ProcessMaker\Project\Bpmn();
|
||||
$flagActionsByEmail = true;
|
||||
|
||||
$data = new stdclass();
|
||||
$data->TAS_UID = $sTasUid;
|
||||
$data->APP_UID = $sAppUid;
|
||||
$data->DEL_INDEX = $delIndex;
|
||||
$data->USR_UID = $sUsrUid;
|
||||
$data->PREVIOUS_USR_UID = $delPreviusUsrUid;
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->executeTriggers(PM_CREATE_NEW_DELEGATION, $data);
|
||||
|
||||
if ($bpmn->exists($sProUid)) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
// this section evaluates the actions by email trigger execution please
|
||||
// modify this section carefully, the if evaluation checks if the license has been
|
||||
@@ -196,6 +199,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
if ($resultAbe->next()) {
|
||||
$dataAbe = $resultAbe->getRow();
|
||||
if($dataAbe['ABE_TYPE']!=''){
|
||||
$flagActionsByEmail = false;
|
||||
G::LoadClass('actionsByEmailCore');
|
||||
$actionsByEmail = new actionsByEmailCoreClass();
|
||||
$actionsByEmail->sendActionsByEmail($data);
|
||||
@@ -203,6 +207,13 @@ class AppDelegation extends BaseAppDelegation
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
}
|
||||
|
||||
if ($flagActionsByEmail) {
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->executeTriggers(PM_CREATE_NEW_DELEGATION, $data);
|
||||
}
|
||||
}
|
||||
|
||||
return $delIndex;
|
||||
|
||||
@@ -104,21 +104,39 @@ class ListInbox extends BaseListInbox
|
||||
$listParticipatedLast = new ListParticipatedLast();
|
||||
$listParticipatedLast->remove($data['APP_UID'], $data['USR_UID'], $data['DEL_INDEX']);
|
||||
|
||||
//Update
|
||||
//Update - SET
|
||||
$criteriaSet = new Criteria("workflow");
|
||||
$criteriaSet->add(ListParticipatedLastPeer::USR_UID, $data["USR_UID"]);
|
||||
|
||||
//Update - WHERE
|
||||
$criteriaWhere = new Criteria("workflow");
|
||||
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $data["APP_UID"], Criteria::EQUAL);
|
||||
$criteriaWhere->add(ListParticipatedLastPeer::USR_UID, 'SELF_SERVICES', Criteria::EQUAL);
|
||||
$criteriaWhere->add(ListParticipatedLastPeer::USR_UID, "SELF_SERVICES", Criteria::EQUAL);
|
||||
$criteriaWhere->add(ListParticipatedLastPeer::DEL_INDEX, $data["DEL_INDEX"], Criteria::EQUAL);
|
||||
|
||||
//Update - SET
|
||||
$criteriaSet = new Criteria("workflow");
|
||||
$criteriaSet->add(ListParticipatedLastPeer::USR_UID, $data['USR_UID']);
|
||||
BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
|
||||
|
||||
//Update
|
||||
$listParticipatedLast = new ListParticipatedLast();
|
||||
$listParticipatedLast->refresh($data);
|
||||
$users = new Users();
|
||||
$users->refreshTotal($data['USR_UID'], 'add', 'participated');
|
||||
} else {
|
||||
if (isset($data["APP_UID"]) && isset($data["USER_UID"]) && isset($data["DEL_INDEX"]) && isset($data["APP_TITLE"])) {
|
||||
//Update
|
||||
//Update - SET
|
||||
$criteriaSet = new Criteria("workflow");
|
||||
$criteriaSet->add(ListParticipatedLastPeer::APP_TITLE, $data["APP_TITLE"]);
|
||||
|
||||
//Update - WHERE
|
||||
$criteriaWhere = new Criteria("workflow");
|
||||
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $data["APP_UID"], Criteria::EQUAL);
|
||||
$criteriaWhere->add(ListParticipatedLastPeer::USR_UID, $data["USER_UID"], Criteria::EQUAL);
|
||||
$criteriaWhere->add(ListParticipatedLastPeer::DEL_INDEX, $data["DEL_INDEX"], Criteria::EQUAL);
|
||||
|
||||
$result = BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
|
||||
}
|
||||
}
|
||||
|
||||
if((array_key_exists('TAS_UID', $data) && isset($data['TAS_UID'])) && (array_key_exists('TAS_UID', $data) && isset($data['PRO_UID'])) && isset($data['APP_UID'])) {
|
||||
|
||||
@@ -203,6 +203,7 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
||||
$category = isset($filters['category']) ? $filters['category'] : "";
|
||||
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
||||
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
||||
$filterStatus = isset($filters['filterStatus']) ? $filters['filterStatus'] : "";
|
||||
$newestthan = isset($filters['newestthan'] ) ? $filters['newestthan'] : '';
|
||||
$oldestthan = isset($filters['oldestthan'] ) ? $filters['oldestthan'] : '';
|
||||
|
||||
@@ -224,6 +225,10 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
||||
addOr( $criteria->getNewCriterion( ListParticipatedLastPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
||||
}
|
||||
|
||||
if($filterStatus != ''){
|
||||
$criteria->add(ListParticipatedLastPeer::APP_STATUS, '%' . $filterStatus . '%', Criteria::LIKE );
|
||||
}
|
||||
|
||||
if ($process != '') {
|
||||
$criteria->add( ListParticipatedLastPeer::PRO_UID, $process, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
@@ -229,8 +229,8 @@ class ListPaused extends BaseListPaused {
|
||||
|
||||
if ($search != '') {
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion( 'CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( 'CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
|
||||
$criteria->getNewCriterion( ListPausedPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( ListPausedPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( ListPausedPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -317,5 +317,46 @@ class Route extends BaseRoute
|
||||
|
||||
return $routes;
|
||||
}
|
||||
|
||||
public function updateRouteOrder($data)
|
||||
{
|
||||
foreach($data as $i => $r) {
|
||||
$aData = array_change_key_case($r, CASE_UPPER);
|
||||
$route = Route::findOneBy(array(RoutePeer::PRO_UID => $aData['PRO_UID'], RoutePeer::ROU_NEXT_TASK => $aData['ROU_NEXT_TASK']));
|
||||
if(!empty($route)) {
|
||||
$aData['ROU_UID'] = $route->getRouUid();
|
||||
$this->update($aData);
|
||||
unset($aData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function updateRouteOrderFromProject($prjUid)
|
||||
{
|
||||
$accountsArray = array();
|
||||
$criteria = new \Criteria("workflow");
|
||||
$criteria->clearSelectColumns();
|
||||
$criteria->addSelectColumn(\BpmnFlowPeer::FLO_POSITION);
|
||||
$criteria->addSelectColumn(\BpmnFlowPeer::FLO_ELEMENT_DEST);
|
||||
$criteria->addSelectColumn(\BpmnFlowPeer::PRJ_UID);
|
||||
$criteria->addSelectColumn(\BpmnFlowPeer::FLO_TYPE);
|
||||
$criteria->add(\BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE, 'bpmnGateway');
|
||||
$criteria->add(\BpmnFlowPeer::PRJ_UID, $prjUid);
|
||||
$criteria->addAscendingOrderByColumn(BpmnFlowPeer::FLO_POSITION);
|
||||
$result = \BpmnFlowPeer::doSelectRS($criteria);
|
||||
$result->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$result->next();
|
||||
$j=0;
|
||||
$k=1;
|
||||
while ($aRow = $result->getRow()) {
|
||||
$accountsArray[$j]['PRO_UID'] = $aRow['PRJ_UID'];
|
||||
$accountsArray[$j]['ROU_NEXT_TASK'] = $aRow['FLO_ELEMENT_DEST'];
|
||||
$accountsArray[$j]['ROU_CASE'] = $k++;
|
||||
$result->next();
|
||||
$j++;
|
||||
}
|
||||
if(sizeof($accountsArray)) {
|
||||
$this->updateRouteOrder($accountsArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,8 +498,9 @@ class Task extends BaseTask
|
||||
|
||||
try {
|
||||
$con->begin();
|
||||
$this->load($fields["TAS_UID"]);
|
||||
$oldValues = $this->load($fields["TAS_UID"]);
|
||||
$this->fromArray($fields, BasePeer::TYPE_FIELDNAME);
|
||||
$this->validateAssignType($fields,$oldValues);
|
||||
|
||||
if ($this->validate()) {
|
||||
$taskDefTitlePrevious = null;
|
||||
@@ -787,5 +788,29 @@ class Task extends BaseTask
|
||||
|
||||
return $event_uid;
|
||||
}
|
||||
|
||||
public function validateAssignType($newValues,$oldValues)
|
||||
{
|
||||
if(isset($newValues['TAS_ASSIGN_TYPE']) && isset($oldValues['TAS_ASSIGN_TYPE'])) {
|
||||
$newAssigType = $newValues['TAS_ASSIGN_TYPE'];
|
||||
$oldAssigType = $oldValues['TAS_ASSIGN_TYPE'];
|
||||
if($newAssigType == 'SELF_SERVICE'){
|
||||
$newAssigType = isset($newValues['TAS_GROUP_VARIABLE'])?(empty($newValues['TAS_GROUP_VARIABLE'])?'SELF_SERVICE':'SELF_SERVICE_VALUE_BASED'):'SELF_SERVICE';
|
||||
}
|
||||
if($oldAssigType == 'SELF_SERVICE'){
|
||||
$oldAssigType = isset($oldValues['TAS_GROUP_VARIABLE'])?(empty($oldValues['TAS_GROUP_VARIABLE'])?'SELF_SERVICE':'SELF_SERVICE_VALUE_BASED'):'SELF_SERVICE';
|
||||
}
|
||||
if(($oldAssigType == 'SELF_SERVICE' && $newAssigType != 'SELF_SERVICE') || ($oldAssigType == 'SELF_SERVICE_VALUE_BASED' && $newAssigType != 'SELF_SERVICE_VALUE_BASED')) {
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->add(AppDelegationPeer::DEL_THREAD_STATUS, "OPEN");
|
||||
$oCriteria->add(AppDelegationPeer::TAS_UID, $newValues['TAS_UID']);
|
||||
$oApplication = AppDelegationPeer::doSelectOne($oCriteria);
|
||||
if(!empty($oApplication)) {
|
||||
throw (new Exception(G::LoadTranslation('ID_CURRENT_ASSING_TYPE_WITH_CASES')));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,10 @@ class AbeConfigurationMapBuilder
|
||||
|
||||
$tMap->addColumn('ABE_UPDATE_DATE', 'AbeUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('ABE_SUBJECT_FIELD', 'AbeSubjectField', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
$tMap->addColumn('ABE_SUBJECT_FIELD', 'AbeSubjectField', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('ABE_MAILSERVER_OR_MAILCURRENT', 'AbeMailserverOrMailcurrent', 'int', CreoleTypes::INTEGER, false, null);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // AbeConfigurationMapBuilder
|
||||
|
||||
@@ -103,7 +103,13 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
* The value for the abe_subject_field field.
|
||||
* @var string
|
||||
*/
|
||||
protected $abe_subject_field;
|
||||
protected $abe_subject_field = '';
|
||||
|
||||
/**
|
||||
* The value for the abe_mailserver_or_mailcurrent field.
|
||||
* @var int
|
||||
*/
|
||||
protected $abe_mailserver_or_mailcurrent = 0;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
@@ -304,6 +310,17 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
return $this->abe_subject_field;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [abe_mailserver_or_mailcurrent] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getAbeMailserverOrMailcurrent()
|
||||
{
|
||||
|
||||
return $this->abe_mailserver_or_mailcurrent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [abe_uid] column.
|
||||
*
|
||||
@@ -604,6 +621,28 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
|
||||
} // setAbeSubjectField()
|
||||
|
||||
/**
|
||||
* Set the value of [abe_mailserver_or_mailcurrent] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setAbeMailserverOrMailcurrent($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is integer,
|
||||
// we will cast the input value to an int (if it is not).
|
||||
if ($v !== null && !is_int($v) && is_numeric($v)) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->abe_mailserver_or_mailcurrent !== $v || $v === 0) {
|
||||
$this->abe_mailserver_or_mailcurrent = $v;
|
||||
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT;
|
||||
}
|
||||
|
||||
} // setAbeMailserverOrMailcurrent()
|
||||
|
||||
/**
|
||||
* Hydrates (populates) the object variables with values from the database resultset.
|
||||
*
|
||||
@@ -645,14 +684,16 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
|
||||
$this->abe_update_date = $rs->getTimestamp($startcol + 11, null);
|
||||
|
||||
$this->abe_subject_field = $rs->getString($startcol + 12, null);
|
||||
$this->abe_subject_field = $rs->getString($startcol + 12);
|
||||
|
||||
$this->abe_mailserver_or_mailcurrent = $rs->getInt($startcol + 13);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 13; // 13 = AbeConfigurationPeer::NUM_COLUMNS - AbeConfigurationPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 14; // 14 = AbeConfigurationPeer::NUM_COLUMNS - AbeConfigurationPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating AbeConfiguration object", $e);
|
||||
@@ -895,6 +936,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
case 12:
|
||||
return $this->getAbeSubjectField();
|
||||
break;
|
||||
case 13:
|
||||
return $this->getAbeMailserverOrMailcurrent();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -928,6 +972,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
$keys[10] => $this->getAbeCreateDate(),
|
||||
$keys[11] => $this->getAbeUpdateDate(),
|
||||
$keys[12] => $this->getAbeSubjectField(),
|
||||
$keys[13] => $this->getAbeMailserverOrMailcurrent(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -998,6 +1043,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
case 12:
|
||||
$this->setAbeSubjectField($value);
|
||||
break;
|
||||
case 13:
|
||||
$this->setAbeMailserverOrMailcurrent($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -1072,6 +1120,11 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
if (array_key_exists($keys[12], $arr)) {
|
||||
$this->setAbeSubjectField($arr[$keys[12]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[13], $arr)) {
|
||||
$this->setAbeMailserverOrMailcurrent($arr[$keys[13]]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1135,6 +1188,11 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
$criteria->add(AbeConfigurationPeer::ABE_SUBJECT_FIELD, $this->abe_subject_field);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT)) {
|
||||
$criteria->add(AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT, $this->abe_mailserver_or_mailcurrent);
|
||||
}
|
||||
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
@@ -1212,6 +1270,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setAbeSubjectField($this->abe_subject_field);
|
||||
|
||||
$copyObj->setAbeMailserverOrMailcurrent($this->abe_mailserver_or_mailcurrent);
|
||||
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setAbeUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseAbeConfigurationPeer
|
||||
const CLASS_DEFAULT = 'classes.model.AbeConfiguration';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 13;
|
||||
const NUM_COLUMNS = 14;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -70,6 +70,9 @@ abstract class BaseAbeConfigurationPeer
|
||||
/** the column name for the ABE_SUBJECT_FIELD field */
|
||||
const ABE_SUBJECT_FIELD = 'ABE_CONFIGURATION.ABE_SUBJECT_FIELD';
|
||||
|
||||
/** the column name for the ABE_MAILSERVER_OR_MAILCURRENT field */
|
||||
const ABE_MAILSERVER_OR_MAILCURRENT = 'ABE_CONFIGURATION.ABE_MAILSERVER_OR_MAILCURRENT';
|
||||
|
||||
/** The PHP to DB Name Mapping */
|
||||
private static $phpNameMap = null;
|
||||
|
||||
@@ -81,10 +84,10 @@ abstract class BaseAbeConfigurationPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('AbeUid', 'ProUid', 'TasUid', 'AbeType', 'AbeTemplate', 'AbeDynType', 'DynUid', 'AbeEmailField', 'AbeActionField', 'AbeCaseNoteInResponse', 'AbeCreateDate', 'AbeUpdateDate', 'AbeSubjectField', ),
|
||||
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID, AbeConfigurationPeer::PRO_UID, AbeConfigurationPeer::TAS_UID, AbeConfigurationPeer::ABE_TYPE, AbeConfigurationPeer::ABE_TEMPLATE, AbeConfigurationPeer::ABE_DYN_TYPE, AbeConfigurationPeer::DYN_UID, AbeConfigurationPeer::ABE_EMAIL_FIELD, AbeConfigurationPeer::ABE_ACTION_FIELD, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, AbeConfigurationPeer::ABE_CREATE_DATE, AbeConfigurationPeer::ABE_UPDATE_DATE, AbeConfigurationPeer::ABE_SUBJECT_FIELD, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID', 'ABE_EMAIL_FIELD', 'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE', 'ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
BasePeer::TYPE_PHPNAME => array ('AbeUid', 'ProUid', 'TasUid', 'AbeType', 'AbeTemplate', 'AbeDynType', 'DynUid', 'AbeEmailField', 'AbeActionField', 'AbeCaseNoteInResponse', 'AbeCreateDate', 'AbeUpdateDate', 'AbeSubjectField', 'AbeMailserverOrMailcurrent', ),
|
||||
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID, AbeConfigurationPeer::PRO_UID, AbeConfigurationPeer::TAS_UID, AbeConfigurationPeer::ABE_TYPE, AbeConfigurationPeer::ABE_TEMPLATE, AbeConfigurationPeer::ABE_DYN_TYPE, AbeConfigurationPeer::DYN_UID, AbeConfigurationPeer::ABE_EMAIL_FIELD, AbeConfigurationPeer::ABE_ACTION_FIELD, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, AbeConfigurationPeer::ABE_CREATE_DATE, AbeConfigurationPeer::ABE_UPDATE_DATE, AbeConfigurationPeer::ABE_SUBJECT_FIELD, AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID', 'ABE_EMAIL_FIELD', 'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE', 'ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD', 'ABE_MAILSERVER_OR_MAILCURRENT', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -94,10 +97,10 @@ abstract class BaseAbeConfigurationPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('AbeUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'AbeType' => 3, 'AbeTemplate' => 4, 'AbeDynType' => 5, 'DynUid' => 6, 'AbeEmailField' => 7, 'AbeActionField' => 8, 'AbeCaseNoteInResponse' => 9, 'AbeCreateDate' => 10, 'AbeUpdateDate' => 11, 'AbeSubjectField' => 12, ),
|
||||
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID => 0, AbeConfigurationPeer::PRO_UID => 1, AbeConfigurationPeer::TAS_UID => 2, AbeConfigurationPeer::ABE_TYPE => 3, AbeConfigurationPeer::ABE_TEMPLATE => 4, AbeConfigurationPeer::ABE_DYN_TYPE => 5, AbeConfigurationPeer::DYN_UID => 6, AbeConfigurationPeer::ABE_EMAIL_FIELD => 7, AbeConfigurationPeer::ABE_ACTION_FIELD => 8, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE => 9, AbeConfigurationPeer::ABE_CREATE_DATE => 10, AbeConfigurationPeer::ABE_UPDATE_DATE => 11, AbeConfigurationPeer::ABE_SUBJECT_FIELD => 12, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ABE_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'ABE_TYPE' => 3, 'ABE_TEMPLATE' => 4, 'ABE_DYN_TYPE' => 5, 'DYN_UID' => 6, 'ABE_EMAIL_FIELD' => 7, 'ABE_ACTION_FIELD' => 8, 'ABE_CASE_NOTE_IN_RESPONSE' => 9, 'ABE_CREATE_DATE' => 10, 'ABE_UPDATE_DATE' => 11, 'ABE_SUBJECT_FIELD' => 12, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
BasePeer::TYPE_PHPNAME => array ('AbeUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'AbeType' => 3, 'AbeTemplate' => 4, 'AbeDynType' => 5, 'DynUid' => 6, 'AbeEmailField' => 7, 'AbeActionField' => 8, 'AbeCaseNoteInResponse' => 9, 'AbeCreateDate' => 10, 'AbeUpdateDate' => 11, 'AbeSubjectField' => 12, 'AbeMailserverOrMailcurrent' => 13, ),
|
||||
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID => 0, AbeConfigurationPeer::PRO_UID => 1, AbeConfigurationPeer::TAS_UID => 2, AbeConfigurationPeer::ABE_TYPE => 3, AbeConfigurationPeer::ABE_TEMPLATE => 4, AbeConfigurationPeer::ABE_DYN_TYPE => 5, AbeConfigurationPeer::DYN_UID => 6, AbeConfigurationPeer::ABE_EMAIL_FIELD => 7, AbeConfigurationPeer::ABE_ACTION_FIELD => 8, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE => 9, AbeConfigurationPeer::ABE_CREATE_DATE => 10, AbeConfigurationPeer::ABE_UPDATE_DATE => 11, AbeConfigurationPeer::ABE_SUBJECT_FIELD => 12, AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT => 13, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ABE_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'ABE_TYPE' => 3, 'ABE_TEMPLATE' => 4, 'ABE_DYN_TYPE' => 5, 'DYN_UID' => 6, 'ABE_EMAIL_FIELD' => 7, 'ABE_ACTION_FIELD' => 8, 'ABE_CASE_NOTE_IN_RESPONSE' => 9, 'ABE_CREATE_DATE' => 10, 'ABE_UPDATE_DATE' => 11, 'ABE_SUBJECT_FIELD' => 12, 'ABE_MAILSERVER_OR_MAILCURRENT' => 13, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -224,6 +227,8 @@ abstract class BaseAbeConfigurationPeer
|
||||
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_SUBJECT_FIELD);
|
||||
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(ABE_CONFIGURATION.ABE_UID)';
|
||||
|
||||
@@ -4664,6 +4664,16 @@
|
||||
<parameter name="Extra" value=""/>
|
||||
</vendor>
|
||||
</column>
|
||||
<column name="ABE_MAILSERVER_OR_MAILCURRENT" type="INTEGER" required="false" default="0">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Field" value="ABE_MAILSERVER_OR_MAILCURRENT"/>
|
||||
<parameter name="Type" value="int(1)"/>
|
||||
<parameter name="Null" value="YES"/>
|
||||
<parameter name="Key" value=""/>
|
||||
<parameter name="Default" value="0"/>
|
||||
<parameter name="Extra" value=""/>
|
||||
</vendor>
|
||||
</column>
|
||||
</table>
|
||||
|
||||
<table name="ABE_REQUESTS">
|
||||
|
||||
@@ -126,6 +126,8 @@ class Designer extends Controller
|
||||
$translation->generateFileTranslationMafe();
|
||||
}
|
||||
|
||||
$this->setVar('sys_skin', SYS_SKIN);
|
||||
|
||||
$this->setView('designer/index');
|
||||
$this->render();
|
||||
}
|
||||
|
||||
@@ -2651,6 +2651,7 @@ CREATE TABLE `ABE_CONFIGURATION`
|
||||
`ABE_CREATE_DATE` DATETIME NOT NULL,
|
||||
`ABE_UPDATE_DATE` DATETIME,
|
||||
`ABE_SUBJECT_FIELD` VARCHAR(100) default '' NOT NULL,
|
||||
`ABE_MAILSERVER_OR_MAILCURRENT` INTEGER default 0 NOT NULL,
|
||||
PRIMARY KEY (`ABE_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='The plugin table for actionsByEmail';
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@@ -956,9 +956,6 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$Fields['actionType'] = $_POST['actionType'];
|
||||
$Fields["docVersion"] = (int)($_POST["docVersion"]);
|
||||
|
||||
$appDocument = new AppDocument();
|
||||
$arrayAppDocumentData = $appDocument->load($_POST["appDocId"]);
|
||||
|
||||
$oInputDocument = new InputDocument();
|
||||
$InpDocData = $oInputDocument->load( $Fields['DOC_UID'] );
|
||||
|
||||
@@ -971,7 +968,13 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$Fields["INP_DOC_MAX_FILESIZE_LABEL"] = ($inpDocMaxFilesize > 0)? "[" . $InpDocData["INP_DOC_MAX_FILESIZE"] . " " . $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"] . "]" : "";
|
||||
$Fields['fileTypes'] = $InpDocData['INP_DOC_TYPE_FILE'];
|
||||
|
||||
if($_POST['actionType'] == 'NV'){
|
||||
$appDocument = new AppDocument();
|
||||
$arrayAppDocumentData = $appDocument->load($_POST["appDocId"]);
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral', '', $Fields, 'cases_SupervisorSaveDocument?APP_DOC_UID=' . $_POST['appDocId'] . "&DOC_VERSION=" . ($Fields['docVersion'] + 1) . '&APP_UID=' . $arrayAppDocumentData["APP_UID"] . '&UID=' . $_POST['docID']);
|
||||
}else{
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral', '', $Fields, 'cases_SupervisorSaveDocument?UID=' . $_POST['docID'] . '&APP_UID=' . $_POST['appDocId'] );
|
||||
}
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case "inputDocumentVersionHistory":
|
||||
|
||||
@@ -208,6 +208,5 @@ if (isset( $_FILES["form"]["name"] ) && count( $_FILES["form"]["name"] ) > 0) {
|
||||
|
||||
//go to the next step
|
||||
$aNextStep = $oCase->getNextSupervisorStep( $_SESSION['PROCESS'], $_SESSION['STEP_POSITION'] );
|
||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
||||
G::header( 'location: cases_StepToRevise?DYN_UID=' . $aNextStep['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] );
|
||||
|
||||
|
||||
@@ -96,8 +96,25 @@ if (! isset( $_GET['type'] )) {
|
||||
$_GET['type'] = 'DYNAFORM';
|
||||
}
|
||||
if (! isset( $_GET['position'] )) {
|
||||
$_GET['position'] = $_SESSION['STEP_POSITION'];
|
||||
}else{
|
||||
if($_GET['type'] == 'DYNAFORM'){
|
||||
$criteria = new Criteria();
|
||||
|
||||
$criteria->addSelectColumn(StepSupervisorPeer::STEP_POSITION);
|
||||
$criteria->add(StepSupervisorPeer::PRO_UID, $_SESSION['PROCESS'], Criteria::EQUAL);
|
||||
$criteria->add(StepSupervisorPeer::STEP_UID_OBJ, $_GET['DYN_UID'], Criteria::EQUAL);
|
||||
|
||||
$rsCriteria = StepSupervisorPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rsCriteria->next();
|
||||
$aRow = $rsCriteria->getRow();
|
||||
|
||||
$_GET['position'] = $aRow['STEP_POSITION'];
|
||||
}else{
|
||||
$_GET['position'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['STEP_POSITION'] = (int) $_GET['position'];
|
||||
|
||||
|
||||
@@ -238,7 +238,6 @@ try {
|
||||
$heartBeatNWIDate = time();
|
||||
}
|
||||
if (time() >= $heartBeatNWIDate) {
|
||||
$oServerConf->setWsInfo(SYS_SYS, $oServerConf->getWorkspaceInfo(SYS_SYS));
|
||||
$oServerConf->setHeartbeatProperty('HB_NEXT_GWI_DATE', strtotime('+1 day'), 'HEART_BEAT_CONF');
|
||||
}
|
||||
|
||||
@@ -320,7 +319,9 @@ try {
|
||||
}
|
||||
$aFields['DESCRIPTION'] .= '<br />' . G::LoadTranslation('ID_PLEASE_CHANGE_PASSWORD_POLICY') . '<br /><br /></span>';
|
||||
$G_PUBLISH = new Publisher;
|
||||
if(SYS_SKIN == 'neoclassic'){
|
||||
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
||||
$version = isset($version[0]) ? intval($version[0]) : 0;
|
||||
if ($version >= 3) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/changePasswordpm3', '', $aFields, 'changePassword');
|
||||
}else{
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/changePassword', '', $aFields, 'changePassword');
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
*
|
||||
*/
|
||||
$G_PUBLISH = new Publisher ();
|
||||
if(SYS_SKIN == 'neoclassic'){
|
||||
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
||||
$version = isset($version[0]) ? intval($version[0]) : 0;
|
||||
if ($version >= 3) {
|
||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'login/forgotPasswordpm3', '', array(), 'retrivePassword.php');
|
||||
}else{
|
||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'login/forgotPassword', '', array(), 'retrivePassword.php');
|
||||
|
||||
@@ -171,7 +171,9 @@ if (!class_exists('pmLicenseManager')) {
|
||||
$licenseManager =& pmLicenseManager::getSingleton();
|
||||
if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
if(SYS_SKIN == 'neoclassic'){
|
||||
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
||||
$version = isset($version[0]) ? intval($version[0]) : 0;
|
||||
if ($version >= 3) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpiredpm3', '', array(), 'licenseUpdate');
|
||||
}else{
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpired', '', array(), 'licenseUpdate');
|
||||
@@ -219,7 +221,9 @@ if (isset($oConf->aConfig["login_defaultLanguage"]) && $oConf->aConfig["login_de
|
||||
}
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
if(SYS_SKIN == 'neoclassic'){
|
||||
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
||||
$version = isset($version[0]) ? intval($version[0]) : 0;
|
||||
if ($version >= 3) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/loginpm3', '', $aFields, SYS_URI . 'login/authentication.php');
|
||||
}else{
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI . 'login/authentication.php');
|
||||
|
||||
@@ -155,26 +155,20 @@ if (!defined('WS_IN_LOGIN')) {
|
||||
define('WS_IN_LOGIN', 'serverconf');
|
||||
}
|
||||
$fileLogin = 'login/sysLogin';
|
||||
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
||||
$version = isset($version[0]) ? intval($version[0]) : 0;
|
||||
switch (WS_IN_LOGIN) {
|
||||
case 'serverconf':
|
||||
//Get Server Configuration
|
||||
$oServerConf = & serverConf::getSingleton ();
|
||||
if ($oServerConf->getProperty ('LOGIN_NO_WS')) {
|
||||
if(SYS_SKIN == 'neoclassic'){
|
||||
$fileLogin = 'login/sysLoginNoWSpm3';
|
||||
}else{
|
||||
$fileLogin = 'login/sysLoginNoWS';
|
||||
}
|
||||
$fileLogin = $version >= 3 ? 'login/sysLoginNoWSpm3' : 'login/sysLoginNoWS';
|
||||
} else {
|
||||
$fileLogin = 'login/sysLogin';
|
||||
}
|
||||
break;
|
||||
case 'no':
|
||||
if(SYS_SKIN == 'neoclassic'){
|
||||
$fileLogin = 'login/sysLoginNoWSpm3';
|
||||
}else{
|
||||
$fileLogin = 'login/sysLoginNoWS';
|
||||
}
|
||||
$fileLogin = $version >= 3 ? 'login/sysLoginNoWSpm3' : 'login/sysLoginNoWS';
|
||||
break;
|
||||
case 'yes':
|
||||
$fileLogin = 'login/sysLogin';
|
||||
@@ -183,6 +177,6 @@ switch (WS_IN_LOGIN) {
|
||||
$fileLogin = 'login/sysLogin';
|
||||
break;
|
||||
}
|
||||
|
||||
error_log($fileLogin);
|
||||
$G_PUBLISH->AddContent ('xmlform', 'xmlform', $fileLogin, '', $aField, 'sysLogin');
|
||||
G::RenderPage ("publish");
|
||||
|
||||
@@ -39,7 +39,7 @@ if (PMLicensedFeatures
|
||||
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$result->next();
|
||||
$configuration = $result->getRow();
|
||||
$a = new pmDynaform(G::decrypt($_REQUEST['DYN_UID'], URL_KEY));
|
||||
|
||||
$action = 'ActionsByEmailDataFormPost.php?APP_UID=' . $_REQUEST['APP_UID'] . '&DEL_INDEX=' . $_REQUEST['DEL_INDEX'] . '&ABER=' . $_REQUEST['ABER'];
|
||||
$record['DYN_CONTENT'] = $configuration['DYN_CONTENT'];
|
||||
$record['PRO_UID'] = $configuration['PRO_UID'];
|
||||
@@ -48,6 +48,7 @@ if (PMLicensedFeatures
|
||||
$record['DEL_INDEX'] = $_REQUEST['DEL_INDEX'];
|
||||
$record['ABER'] = $_REQUEST['ABER'];
|
||||
if (is_null($caseFields['DEL_FINISH_DATE'])) {
|
||||
$a = new pmDynaform($record);
|
||||
$a->printABE($action,$record);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showInfo', '', array('MESSAGE' => '<strong>The form has already been filled and sent.</strong>'));
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
//echo G::generateUniqueNumber();
|
||||
if(SYS_SKIN == 'neoclassic'){
|
||||
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
||||
$version = isset($version[0]) ? intval($version[0]) : 0;
|
||||
if ($version >= 3) {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/loginpm3', '', '', SYS_URI . 'tracker/authentication.php' );
|
||||
}else{
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/login', '', '', SYS_URI . 'tracker/authentication.php' );
|
||||
|
||||
@@ -59,6 +59,7 @@ class ActionsByEmail
|
||||
$configuration['ABE_SUBJECT_FIELD'] = $configuration['ABE_SUBJECT_FIELD'];
|
||||
$configuration['ABE_EMAIL_FIELD'] = $configuration['ABE_EMAIL_FIELD'];
|
||||
$configuration['ABE_ACTION_FIELD'] = $configuration['ABE_ACTION_FIELD'];
|
||||
$configuration['ABE_MAILSERVER_OR_MAILCURRENT'] = $configuration['ABE_MAILSERVER_OR_MAILCURRENT'];
|
||||
$configuration['ABE_CASE_NOTE_IN_RESPONSE'] = $configuration['ABE_CASE_NOTE_IN_RESPONSE'] ? '["1"]' : '[]';
|
||||
}
|
||||
$configuration['feature'] = 'ActionsByEmail';
|
||||
|
||||
@@ -49,16 +49,25 @@ class Cases
|
||||
* Verify if does not exist the Case in table APPLICATION
|
||||
*
|
||||
* @param string $applicationUid Unique id of Case
|
||||
* @param string $delIndex Delegation index
|
||||
* @param string $fieldNameForException Field name for the exception
|
||||
*
|
||||
* return void Throw exception if does not exist the Case in table APPLICATION
|
||||
*/
|
||||
public function throwExceptionIfNotExistsCase($applicationUid, $fieldNameForException)
|
||||
public function throwExceptionIfNotExistsCase($applicationUid, $delIndex, $fieldNameForException)
|
||||
{
|
||||
try {
|
||||
$obj = \ApplicationPeer::retrieveByPK($applicationUid);
|
||||
|
||||
if (is_null($obj)) {
|
||||
$flag = is_null($obj);
|
||||
|
||||
if (!$flag && $delIndex > 0) {
|
||||
$obj = \AppDelegationPeer::retrieveByPK($applicationUid, $delIndex);
|
||||
|
||||
$flag = is_null($obj);
|
||||
}
|
||||
|
||||
if ($flag) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_CASE_DOES_NOT_EXIST2", array($fieldNameForException, $applicationUid)));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
@@ -440,7 +449,7 @@ class Cases
|
||||
\G::LoadClass("wsBase");
|
||||
|
||||
//Verify data
|
||||
$this->throwExceptionIfNotExistsCase($applicationUid, $this->getFieldNameByFormatFieldName("APP_UID"));
|
||||
$this->throwExceptionIfNotExistsCase($applicationUid, 0, $this->getFieldNameByFormatFieldName("APP_UID"));
|
||||
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
@@ -536,7 +545,7 @@ class Cases
|
||||
{
|
||||
try {
|
||||
//Verify data
|
||||
$this->throwExceptionIfNotExistsCase($applicationUid, $this->getFieldNameByFormatFieldName("APP_UID"));
|
||||
$this->throwExceptionIfNotExistsCase($applicationUid, 0, $this->getFieldNameByFormatFieldName("APP_UID"));
|
||||
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
@@ -1586,6 +1595,16 @@ class Cases
|
||||
Validator::isString($usr_uid, '$usr_uid');
|
||||
Validator::usrUid($usr_uid, '$usr_uid');
|
||||
|
||||
$arrayResult = $this->getStatusInfo($app_uid);
|
||||
|
||||
if ($arrayResult["APP_STATUS"] == "CANCELLED") {
|
||||
throw new \Exception(\G::LoadTranslation("ID_CASE_CANCELLED", array($app_uid)));
|
||||
}
|
||||
|
||||
if ($arrayResult["APP_STATUS"] == "COMPLETED") {
|
||||
throw new \Exception(\G::LoadTranslation("ID_CASE_IS_COMPLETED", array($app_uid)));
|
||||
}
|
||||
|
||||
$appCacheView = new \AppCacheView();
|
||||
$isProcessSupervisor = $appCacheView->getProUidSupervisor($usr_uid);
|
||||
$criteria = new \Criteria("workflow");
|
||||
@@ -1805,7 +1824,7 @@ class Cases
|
||||
$arrayTask = array();
|
||||
|
||||
//Verify data
|
||||
$this->throwExceptionIfNotExistsCase($applicationUid, $this->getFieldNameByFormatFieldName("APP_UID"));
|
||||
$this->throwExceptionIfNotExistsCase($applicationUid, 0, $this->getFieldNameByFormatFieldName("APP_UID"));
|
||||
|
||||
//Set variables
|
||||
$process = new \Process();
|
||||
@@ -2363,14 +2382,16 @@ class Cases
|
||||
* Get status info Case
|
||||
*
|
||||
* @param string $applicationUid Unique id of Case
|
||||
* @param int $del_index {@min 1}
|
||||
* @param string $userUid Unique id of User
|
||||
*
|
||||
* return array Return an array with status info Case, array empty otherwise
|
||||
*/
|
||||
public function getStatusInfo($applicationUid)
|
||||
public function getStatusInfo($applicationUid, $delIndex = 0, $userUid = "")
|
||||
{
|
||||
try {
|
||||
//Verify data
|
||||
$this->throwExceptionIfNotExistsCase($applicationUid, $this->getFieldNameByFormatFieldName("APP_UID"));
|
||||
$this->throwExceptionIfNotExistsCase($applicationUid, $delIndex, $this->getFieldNameByFormatFieldName("APP_UID"));
|
||||
|
||||
//Get data
|
||||
//Status is PAUSED
|
||||
@@ -2388,6 +2409,14 @@ class Cases
|
||||
$criteria->getNewCriterion(\AppDelayPeer::APP_DISABLE_ACTION_USER, 0, \Criteria::EQUAL))
|
||||
);
|
||||
|
||||
if ($delIndex != 0) {
|
||||
$criteria->add(\AppDelayPeer::APP_DEL_INDEX, $delIndex, \Criteria::EQUAL);
|
||||
}
|
||||
|
||||
if ($userUid != "") {
|
||||
$criteria->add(\AppDelayPeer::APP_DELEGATION_USER, $userUid, \Criteria::EQUAL);
|
||||
}
|
||||
|
||||
$rsCriteria = \AppDelayPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
@@ -2421,6 +2450,14 @@ class Cases
|
||||
$criteria->getNewCriterion(\AppThreadPeer::APP_THREAD_STATUS, "OPEN"))
|
||||
);
|
||||
|
||||
if ($delIndex != 0) {
|
||||
$criteria->add(\AppDelegationPeer::DEL_INDEX, $delIndex, \Criteria::EQUAL);
|
||||
}
|
||||
|
||||
if ($userUid != "") {
|
||||
$criteria->add(\AppDelegationPeer::USR_UID, $userUid, \Criteria::EQUAL);
|
||||
}
|
||||
|
||||
$rsCriteria = \ApplicationPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
@@ -2445,6 +2482,14 @@ class Cases
|
||||
$criteria->add(\ApplicationPeer::APP_STATUS, array("CANCELLED", "COMPLETED"), \Criteria::IN);
|
||||
$criteria->add(\AppDelegationPeer::DEL_LAST_INDEX, 1, \Criteria::EQUAL);
|
||||
|
||||
if ($delIndex != 0) {
|
||||
$criteria->add(\AppDelegationPeer::DEL_INDEX, $delIndex, \Criteria::EQUAL);
|
||||
}
|
||||
|
||||
if ($userUid != "") {
|
||||
$criteria->add(\AppDelegationPeer::USR_UID, $userUid, \Criteria::EQUAL);
|
||||
}
|
||||
|
||||
$rsCriteria = \ApplicationPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
|
||||
@@ -3,6 +3,169 @@ namespace ProcessMaker\BusinessModel\Cases;
|
||||
|
||||
class OutputDocument
|
||||
{
|
||||
/**
|
||||
* Check if the user has permissions
|
||||
*
|
||||
* @param string $applicationUid Unique id of Case
|
||||
* @param string $delIndex Delegation index
|
||||
* @param string $userUid Unique id of User
|
||||
* @param string $appDocumentUid
|
||||
*
|
||||
* return void Throw exception the user does not have permission to delete
|
||||
*/
|
||||
public function throwExceptionIfHaventPermissionToDelete($applicationUid, $delIndex, $userUid, $appDocumentUid)
|
||||
{
|
||||
try {
|
||||
//Verify data inbox
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
$arrayResult = $case->getStatusInfo($applicationUid, $delIndex, $userUid);
|
||||
|
||||
$flagInbox = 1;
|
||||
|
||||
if (empty($arrayResult) || !preg_match("/^(?:TO_DO|DRAFT)$/", $arrayResult["APP_STATUS"])) {
|
||||
$flagInbox = 0;
|
||||
}
|
||||
|
||||
//Verify data permission
|
||||
$flagPermission = 0;
|
||||
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(\AppDocumentPeer::DOC_UID);
|
||||
|
||||
$criteria->add(\AppDocumentPeer::APP_DOC_UID, $appDocumentUid, \Criteria::EQUAL);
|
||||
$criteria->add(\AppDocumentPeer::APP_UID, $applicationUid, \Criteria::EQUAL);
|
||||
$criteria->add(\AppDocumentPeer::APP_DOC_TYPE, "OUTPUT", \Criteria::EQUAL);
|
||||
|
||||
$rsCriteria = \AppDocumentPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
if ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
|
||||
$outputDocumentUid = $row["DOC_UID"];
|
||||
|
||||
$application = \ApplicationPeer::retrieveByPK($applicationUid);
|
||||
|
||||
//Criteria
|
||||
$criteria2 = new \Criteria("workflow");
|
||||
|
||||
$criteria2->addSelectColumn(\ObjectPermissionPeer::OP_UID);
|
||||
|
||||
$criteria2->add(\ObjectPermissionPeer::PRO_UID, $application->getProUid(), \Criteria::EQUAL);
|
||||
$criteria2->add(\ObjectPermissionPeer::OP_OBJ_TYPE, "OUTPUT", \Criteria::EQUAL);
|
||||
$criteria2->add(
|
||||
$criteria2->getNewCriterion(\ObjectPermissionPeer::OP_OBJ_UID, $outputDocumentUid, \Criteria::EQUAL)->addOr(
|
||||
$criteria2->getNewCriterion(\ObjectPermissionPeer::OP_OBJ_UID, "0", \Criteria::EQUAL))->addOr(
|
||||
$criteria2->getNewCriterion(\ObjectPermissionPeer::OP_OBJ_UID, "", \Criteria::EQUAL))
|
||||
);
|
||||
$criteria2->add(\ObjectPermissionPeer::OP_ACTION, "DELETE", \Criteria::EQUAL);
|
||||
|
||||
//User
|
||||
$criteriaU = clone $criteria2;
|
||||
|
||||
$criteriaU->add(\ObjectPermissionPeer::OP_USER_RELATION, 1, \Criteria::EQUAL);
|
||||
$criteriaU->add(\ObjectPermissionPeer::USR_UID, $userUid, \Criteria::EQUAL);
|
||||
|
||||
$rsCriteriaU = \ObjectPermissionPeer::doSelectRS($criteriaU);
|
||||
$rsCriteriaU->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
if ($rsCriteriaU->next()) {
|
||||
$flagPermission = 1;
|
||||
}
|
||||
|
||||
//Group
|
||||
if ($flagPermission == 0) {
|
||||
$criteriaG = clone $criteria2;
|
||||
|
||||
$criteriaG->add(\ObjectPermissionPeer::OP_USER_RELATION, 2, \Criteria::EQUAL);
|
||||
|
||||
$criteriaG->addJoin(\ObjectPermissionPeer::USR_UID, \GroupUserPeer::GRP_UID, \Criteria::LEFT_JOIN);
|
||||
$criteriaG->add(\GroupUserPeer::USR_UID, $userUid, \Criteria::EQUAL);
|
||||
|
||||
$rsCriteriaG = \ObjectPermissionPeer::doSelectRS($criteriaG);
|
||||
$rsCriteriaG->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
if ($rsCriteriaG->next()) {
|
||||
$flagPermission = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($flagInbox == 1) {
|
||||
if ($flagPermission == 0) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_USER_NOT_HAVE_PERMISSION_DELETE_OUTPUT_DOCUMENT", array($userUid)));
|
||||
}
|
||||
} else {
|
||||
if ($flagPermission == 0) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_USER_NOT_HAVE_PERMISSION_DELETE_OUTPUT_DOCUMENT", array($userUid)));
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if does not exists the inbox
|
||||
*
|
||||
* @param string $applicationUid Unique id of Case
|
||||
* @param string $delIndex Delegation index
|
||||
* @param string $userUid Unique id of User
|
||||
*
|
||||
* return void Throw exception if not exists in inbox
|
||||
*/
|
||||
public function throwExceptionIfCaseNotIsInInbox($applicationUid, $delIndex, $userUid)
|
||||
{
|
||||
try {
|
||||
//Verify data
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
$arrayResult = $case->getStatusInfo($applicationUid, $delIndex, $userUid);
|
||||
|
||||
if (empty($arrayResult) || !preg_match("/^(?:TO_DO|DRAFT)$/", $arrayResult["APP_STATUS"])) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_USER_NOT_HAVE_PERMISSION", array($userUid)));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if not exists OuputDocument in Steps
|
||||
*
|
||||
* @param string $applicationUid Unique id of Case
|
||||
* @param string $delIndex Delegation index
|
||||
* @param string $outDocUuid
|
||||
*
|
||||
* return void Throw exception if not exists OuputDocument in Steps
|
||||
*/
|
||||
public function throwExceptionIfOuputDocumentNotExistsInSteps($applicacionUid, $delIndex, $outputDocumentUid)
|
||||
{
|
||||
try {
|
||||
//Verify data
|
||||
$appDelegation = \AppDelegationPeer::retrieveByPK($applicacionUid, $delIndex);
|
||||
|
||||
$taskUid = $appDelegation->getTasUid();
|
||||
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(\StepPeer::STEP_UID);
|
||||
|
||||
$criteria->add(\StepPeer::TAS_UID, $taskUid, \Criteria::EQUAL);
|
||||
$criteria->add(\StepPeer::STEP_TYPE_OBJ, "OUTPUT_DOCUMENT", \Criteria::EQUAL);
|
||||
$criteria->add(\StepPeer::STEP_UID_OBJ, $outputDocumentUid, \Criteria::EQUAL);
|
||||
|
||||
$rsCriteria = \StepPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
if (!$rsCriteria->next()) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_CASES_OUTPUT_DOES_NOT_EXIST", array($outputDocumentUid)));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data of Cases OutputDocument
|
||||
*
|
||||
|
||||
@@ -581,7 +581,10 @@ class FilesManager
|
||||
try {
|
||||
$oProcessFiles = \ProcessFilesPeer::retrieveByPK($prfUid);
|
||||
$fcontent = file_get_contents($oProcessFiles->getPrfPath());
|
||||
$sFile = end(explode("/",$oProcessFiles->getPrfPath()));
|
||||
$pth = $oProcessFiles->getPrfPath();
|
||||
$pth = str_replace("\\","/",$pth);
|
||||
$prfPath = explode("/",$pth);
|
||||
$sFile = end($prfPath);
|
||||
$path = $oProcessFiles->getPrfPath();
|
||||
$sPath = str_replace($sFile,'',$path);
|
||||
$sSubDirectory = substr(str_replace($sProcessUID,'',substr($sPath,(strpos($sPath, $sProcessUID)))),0,-1);
|
||||
|
||||
@@ -271,11 +271,23 @@ class Light
|
||||
{
|
||||
try {
|
||||
$oCase = new \Cases();
|
||||
$oUser = new \Users();
|
||||
|
||||
$this->lookinginforContentProcess( $proUid );
|
||||
|
||||
$aData = $oCase->startCase( $taskUid, $userId );
|
||||
|
||||
$aUserLog = $oUser->loadDetailed($userId);
|
||||
$_SESSION['APPLICATION'] = $aData['APPLICATION'];
|
||||
$_SESSION['INDEX'] = $aData['INDEX'];
|
||||
$_SESSION['PROCESS'] = $aData['PROCESS'];
|
||||
$_SESSION['TASK'] = $taskUid;
|
||||
$_SESSION["USER_LOGGED"] = $userId;
|
||||
$_SESSION["USR_USERNAME"] = $aUserLog['USR_USERNAME'];
|
||||
|
||||
$aFields = $oCase->loadCase( $aData['APPLICATION'], $aData['INDEX'] );
|
||||
$oCase->updateCase( $aData['APPLICATION'], $aFields );
|
||||
|
||||
$response = array();
|
||||
$response['caseId'] = $aData['APPLICATION'];
|
||||
$response['caseIndex'] = $aData['INDEX'];
|
||||
@@ -1232,6 +1244,16 @@ class Light
|
||||
$fields = \System::getSysInfo();
|
||||
$response['version'] = $fields['PM_VERSION'];
|
||||
|
||||
$conf = new \Configurations();
|
||||
$confEnvironment = $conf->getFormats();
|
||||
|
||||
$response['environment'] = array();
|
||||
if (is_array($confEnvironment)){
|
||||
$response['environment']['format'] = isset($confEnvironment['format'])?$confEnvironment['format']:'';
|
||||
$response['environment']['dateFormat'] = isset($confEnvironment['dateFormat'])?$confEnvironment['dateFormat']:'';
|
||||
$response['environment']['casesListDateFormat'] = isset($confEnvironment['casesListDateFormat'])?$confEnvironment['casesListDateFormat']:'';
|
||||
}
|
||||
|
||||
$Translations = new \Translation;
|
||||
$translationsTable = $Translations->getTranslationEnvironments();
|
||||
$languagesList = array ();
|
||||
|
||||
@@ -399,6 +399,8 @@ abstract class Importer
|
||||
unset($arrayWorkflowTables["process"]["PRO_CREATE_USER"]);
|
||||
unset($arrayWorkflowTables["process"]["PRO_CREATE_DATE"]);
|
||||
unset($arrayWorkflowTables["process"]["PRO_UPDATE_DATE"]);
|
||||
unset($arrayWorkflowTables["process"]["PRO_CATEGORY"]);
|
||||
unset($arrayWorkflowTables["process"]["PRO_CATEGORY_LABEL"]);
|
||||
|
||||
$workflow->update($arrayWorkflowTables["process"]);
|
||||
|
||||
|
||||
@@ -56,26 +56,35 @@ class OutputDocument extends Api
|
||||
{
|
||||
try {
|
||||
$outputDocument = new \ProcessMaker\BusinessModel\Cases\OutputDocument();
|
||||
$outputDocument->throwExceptionIfHaventPermissionToDelete($app_uid, 0, $this->getUserId(), $app_doc_uid);
|
||||
$outputDocument->removeOutputDocument($app_doc_uid);
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @url POST /:app_uid/output-document
|
||||
* @url POST /:app_uid/:del_index/output-document/:out_doc_uid
|
||||
*
|
||||
* @param string $app_uid {@min 32}{@max 32}
|
||||
* @param int $del_index {@min 1}
|
||||
* @param string $out_doc_uid {@min 32}{@max 32}
|
||||
*/
|
||||
public function doPostOutputDocument($app_uid, $out_doc_uid)
|
||||
public function doPostOutputDocument($app_uid, $del_index, $out_doc_uid)
|
||||
{
|
||||
try {
|
||||
$userUid = $this->getUserId();
|
||||
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
$outputDocument = new \ProcessMaker\BusinessModel\Cases\OutputDocument();
|
||||
$outputDocument->throwExceptionIfCaseNotIsInInbox($app_uid, $del_index, $userUid);
|
||||
$outputDocument->throwExceptionIfOuputDocumentNotExistsInSteps($app_uid, $del_index, $out_doc_uid);
|
||||
$response = $outputDocument->addCasesOutputDocument($app_uid, $out_doc_uid, $userUid);
|
||||
|
||||
//Return
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,5 +347,37 @@ class Project extends Api
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @url PUT /:prj_uid/update-route-order
|
||||
*
|
||||
* @param string $prj_uid {@min 32}{@max 32}
|
||||
*/
|
||||
public function doPutUpdateRouteOrder($prj_uid, $request_data)
|
||||
{
|
||||
try {
|
||||
$oRoute = new \Route();
|
||||
$result = $oRoute->updateRouteOrder($request_data);
|
||||
return $result;
|
||||
} catch (\Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @url PUT /:prj_uid/update-route-order-from-project
|
||||
*
|
||||
* @param string $prj_uid {@min 32}{@max 32}
|
||||
*/
|
||||
public function doPutUpdateRouteOrderFromProject($prj_uid)
|
||||
{
|
||||
try {
|
||||
$oRoute = new \Route();
|
||||
$result = $oRoute->updateRouteOrderFromProject($prj_uid);
|
||||
return $result;
|
||||
} catch (\Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ class ProcessPermissions extends Api
|
||||
/**
|
||||
* @param string $prj_uid {@min 1} {@max 32}
|
||||
*
|
||||
* @access public
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
@@ -40,7 +39,6 @@ class ProcessPermissions extends Api
|
||||
* @param string $prj_uid {@min 1} {@max 32}
|
||||
* @param string $ob_uid {@min 1} {@max 32}
|
||||
*
|
||||
* @access public
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
@@ -75,7 +73,6 @@ class ProcessPermissions extends Api
|
||||
* @param string $inputs {@from body}
|
||||
* @param string $outputs {@from body}
|
||||
*
|
||||
* @access public
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
@@ -134,7 +131,6 @@ class ProcessPermissions extends Api
|
||||
* @param string $inputs {@from body}
|
||||
* @param string $outputs {@from body}
|
||||
*
|
||||
* @access public
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
@@ -172,7 +168,6 @@ class ProcessPermissions extends Api
|
||||
* @param string $prj_uid {@min 1} {@max 32}
|
||||
* @param string $ob_uid {@min 1} {@max 32}
|
||||
*
|
||||
* @access public
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
|
||||
@@ -296,14 +296,5 @@ class PmPdo implements \OAuth2\Storage\AuthorizationCodeInterface,
|
||||
return array_merge($a, array_change_key_case($a, $case));
|
||||
}
|
||||
|
||||
public function loadPostEnvironment($request = null)
|
||||
{
|
||||
if (!defined('SYS_LANG')) {
|
||||
$acceptLanguage =$request->headers('ACCEPT_LANGUAGE');
|
||||
$lang = (!is_null($acceptLanguage) && strlen($acceptLanguage)<=2)?$acceptLanguage:'en';
|
||||
define("SYS_LANG", $lang);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -285,8 +285,6 @@ class Server implements iAuthenticate
|
||||
$request = \OAuth2\Request::createFromGlobals();
|
||||
}
|
||||
|
||||
$this->storage->loadPostEnvironment($request);
|
||||
|
||||
$response = $this->server->handleTokenRequest($request); //Set/Get token //PmPdo->setAccessToken()
|
||||
|
||||
$token = $response->getParameters();
|
||||
@@ -334,7 +332,6 @@ class Server implements iAuthenticate
|
||||
public function __isAllowed()
|
||||
{
|
||||
$request = \OAuth2\Request::createFromGlobals();
|
||||
$this->storage->loadPostEnvironment($request);
|
||||
$allowed = $this->server->verifyResourceRequest($request);
|
||||
$token = $this->server->getAccessTokenData($request);
|
||||
self::$userId = $token['user_id'];
|
||||
@@ -394,5 +391,29 @@ class Server implements iAuthenticate
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public static function loadPostEnvironment($request = null)
|
||||
{
|
||||
$acceptLanguage = 'en';
|
||||
if ($request == null) {
|
||||
$request = \OAuth2\Request::createFromGlobals();
|
||||
$acceptLanguage = $request->headers('ACCEPT_LANGUAGE');
|
||||
}
|
||||
|
||||
if (!defined('SYS_LANG')) {
|
||||
$Translations = new \Translation;
|
||||
$translationsTable = $Translations->getTranslationEnvironments();
|
||||
$inLang = false;
|
||||
foreach ($translationsTable as $locale) {
|
||||
if ($locale['LOCALE'] == $acceptLanguage){
|
||||
$inLang = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$lang = $inLang?$acceptLanguage:'en';
|
||||
define("SYS_LANG", $lang);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1189,7 +1189,7 @@ Ext.onReady ( function() {
|
||||
scope: this,
|
||||
'select': function() {
|
||||
filterStatus = comboStatus.value;
|
||||
storeCases.setBaseParam( 'status', filterStatus);
|
||||
storeCases.setBaseParam( 'filterStatus', filterStatus);
|
||||
storeCases.setBaseParam( 'start', 0);
|
||||
storeCases.setBaseParam( 'limit', pageSize);
|
||||
//storeCases.load();
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<link rel="stylesheet" href="/lib/pmdynaform/libs/bootstrap-3.1.1/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/lib/pmdynaform/libs/datepicker/bootstrap-datetimepicker.css">
|
||||
<link rel="stylesheet" href="/lib/pmdynaform/build/css/PMDynaform.css">
|
||||
<link rel="stylesheet" href="/css/{sys_skin}-pm3.css">
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/jquery/jquery-1.11.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/bootstrap-3.1.1/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/datepicker/bootstrap-datetimepicker.js"></script>
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
{else}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/lib/css/mafe-{$buildhash}.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/{$sys_skin}-pm3.css" />
|
||||
<script type="text/javascript">
|
||||
var prj_uid = "{$prj_uid}";
|
||||
var app_uid = "{$app_uid}";
|
||||
|
||||
Reference in New Issue
Block a user