Merged in release/3.2 (pull request #5640)
Updating branch release/3.2.1 (5º merge) Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -326,7 +326,6 @@ EOT
|
|||||||
CLI::taskOpt("lang", "", "lLANG", "lang=LANG");
|
CLI::taskOpt("lang", "", "lLANG", "lang=LANG");
|
||||||
CLI::taskArg('workspace');
|
CLI::taskArg('workspace');
|
||||||
CLI::taskRun("cliListIds");
|
CLI::taskRun("cliListIds");
|
||||||
/*----------------------------------********---------------------------------*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function run_info
|
* Function run_info
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if (!isset($_SESSION['USER_LOGGED'])) {
|
|||||||
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||||
$responseObject->success = true;
|
$responseObject->success = true;
|
||||||
$responseObject->lostSession = true;
|
$responseObject->lostSession = true;
|
||||||
print G::json_encode( $responseObject );
|
print G::json_encode($responseObject);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,29 +15,29 @@ $_REQUEST = $filter->xssFilterHard($_REQUEST);
|
|||||||
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
|
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
|
||||||
|
|
||||||
//Getting the extJs parameters
|
//Getting the extJs parameters
|
||||||
$callback = isset( $_REQUEST["callback"] ) ? $_REQUEST["callback"] : "stcCallback1001";
|
$callback = isset($_REQUEST["callback"]) ? $_REQUEST["callback"] : "stcCallback1001";
|
||||||
//This default value was defined in casesList.js
|
//This default value was defined in casesList.js
|
||||||
$dir = isset( $_REQUEST["dir"] ) ? $_REQUEST["dir"] : "DESC";
|
$dir = isset($_REQUEST["dir"]) ? $_REQUEST["dir"] : "DESC";
|
||||||
//This default value was defined in casesList.js
|
//This default value was defined in casesList.js
|
||||||
$sort = isset( $_REQUEST["sort"] ) ? $_REQUEST["sort"] : "APP_NUMBER";
|
$sort = isset($_REQUEST["sort"]) ? $_REQUEST["sort"] : "APP_NUMBER";
|
||||||
$start = isset( $_REQUEST["start"] ) ? $_REQUEST["start"] : "0";
|
$start = isset($_REQUEST["start"]) ? $_REQUEST["start"] : "0";
|
||||||
$limit = isset( $_REQUEST["limit"] ) ? $_REQUEST["limit"] : "25";
|
$limit = isset($_REQUEST["limit"]) ? $_REQUEST["limit"] : "25";
|
||||||
$filter = isset( $_REQUEST["filter"] ) ? $_REQUEST["filter"] : "";
|
$filter = isset($_REQUEST["filter"]) ? $_REQUEST["filter"] : "";
|
||||||
$process = isset( $_REQUEST["process"] ) ? $_REQUEST["process"] : "";
|
$process = isset($_REQUEST["process"]) ? $_REQUEST["process"] : "";
|
||||||
$category = isset( $_REQUEST["category"] ) ? $_REQUEST["category"] : "";
|
$category = isset($_REQUEST["category"]) ? $_REQUEST["category"] : "";
|
||||||
$status = isset( $_REQUEST["status"] ) ? strtoupper( $_REQUEST["status"] ) : "";
|
$status = isset($_REQUEST["status"]) ? strtoupper($_REQUEST["status"]) : "";
|
||||||
$filterStatus = isset( $_REQUEST["filterStatus"] ) ? strtoupper( $_REQUEST["filterStatus"] ) : "";
|
$filterStatus = isset($_REQUEST["filterStatus"]) ? strtoupper($_REQUEST["filterStatus"]) : "";
|
||||||
$user = isset( $_REQUEST["user"] ) ? $_REQUEST["user"] : "";
|
$user = isset($_REQUEST["user"]) ? $_REQUEST["user"] : "";
|
||||||
$search = isset( $_REQUEST["search"] ) ? $_REQUEST["search"] : "";
|
$search = isset($_REQUEST["search"]) ? $_REQUEST["search"] : "";
|
||||||
$action = isset( $_GET["action"] ) ? $_GET["action"] : (isset( $_REQUEST["action"] ) ? $_REQUEST["action"] : "todo");
|
$action = isset($_GET["action"]) ? $_GET["action"] : (isset($_REQUEST["action"]) ? $_REQUEST["action"] : "todo");
|
||||||
$type = isset( $_GET["type"] ) ? $_GET["type"] : (isset( $_REQUEST["type"] ) ? $_REQUEST["type"] : "extjs");
|
$type = isset($_GET["type"]) ? $_GET["type"] : (isset($_REQUEST["type"]) ? $_REQUEST["type"] : "extjs");
|
||||||
$dateFrom = isset( $_REQUEST["dateFrom"] ) ? substr( $_REQUEST["dateFrom"], 0, 10 ) : "";
|
$dateFrom = isset($_REQUEST["dateFrom"]) ? substr($_REQUEST["dateFrom"], 0, 10) : "";
|
||||||
$dateTo = isset( $_REQUEST["dateTo"] ) ? substr( $_REQUEST["dateTo"], 0, 10 ) : "";
|
$dateTo = isset($_REQUEST["dateTo"]) ? substr($_REQUEST["dateTo"], 0, 10) : "";
|
||||||
$first = isset( $_REQUEST["first"] ) ? true : false;
|
$first = isset($_REQUEST["first"]) ? true : false;
|
||||||
$openApplicationUid = (isset($_REQUEST['openApplicationUid']) && $_REQUEST['openApplicationUid'] != '')?
|
$openApplicationUid = (isset($_REQUEST['openApplicationUid']) && $_REQUEST['openApplicationUid'] != '') ?
|
||||||
$_REQUEST['openApplicationUid'] : null;
|
$_REQUEST['openApplicationUid'] : null;
|
||||||
|
|
||||||
$search = (!is_null($openApplicationUid))? $openApplicationUid : $search;
|
$search = (!is_null($openApplicationUid)) ? $openApplicationUid : $search;
|
||||||
|
|
||||||
if ($sort == 'CASE_SUMMARY' || $sort == 'CASE_NOTES_COUNT') {
|
if ($sort == 'CASE_SUMMARY' || $sort == 'CASE_NOTES_COUNT') {
|
||||||
$sort = 'APP_NUMBER';//DEFAULT VALUE
|
$sort = 'APP_NUMBER';//DEFAULT VALUE
|
||||||
@@ -47,9 +47,8 @@ if ($sort == 'APP_STATUS_LABEL') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$userUid = (isset($_SESSION["USER_LOGGED"]) && $_SESSION["USER_LOGGED"] != "")? $_SESSION["USER_LOGGED"] : null;
|
$userUid = (isset($_SESSION["USER_LOGGED"]) && $_SESSION["USER_LOGGED"] != "") ? $_SESSION["USER_LOGGED"] : null;
|
||||||
$result = "";
|
$result = "";
|
||||||
$solrEnabled = false;
|
|
||||||
|
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case "search":
|
case "search":
|
||||||
@@ -59,60 +58,19 @@ try {
|
|||||||
$result['data'] = array();
|
$result['data'] = array();
|
||||||
$result = G::json_encode($result);
|
$result = G::json_encode($result);
|
||||||
echo $result;
|
echo $result;
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
$user = ($user == "CURRENT_USER")? $userUid : $user;
|
$user = ($user == "CURRENT_USER") ? $userUid : $user;
|
||||||
$userUid = $user;
|
$userUid = $user;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((
|
G::LoadClass("applications");
|
||||||
$action == "todo" || $action == "draft" || $action == "paused" || $action == "sent" ||
|
$apps = new Applications();
|
||||||
$action == "selfservice" || $action == "unassigned" || $action == "search"
|
|
||||||
) &&
|
|
||||||
(($solrConf = System::solrEnv()) !== false)
|
|
||||||
) {
|
|
||||||
G::LoadClass("AppSolr");
|
|
||||||
|
|
||||||
$ApplicationSolrIndex = new AppSolr(
|
if ($action == 'search') {
|
||||||
$solrConf["solr_enabled"],
|
|
||||||
$solrConf["solr_host"],
|
|
||||||
$solrConf["solr_instance"]
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($ApplicationSolrIndex->isSolrEnabled() && $solrConf['solr_enabled'] == true) {
|
|
||||||
//Check if there are missing records to reindex and reindex them
|
|
||||||
$ApplicationSolrIndex->synchronizePendingApplications();
|
|
||||||
$solrEnabled = true;
|
|
||||||
} else{
|
|
||||||
$solrEnabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($solrEnabled) {
|
|
||||||
$data = $ApplicationSolrIndex->getAppGridData(
|
|
||||||
$userUid,
|
|
||||||
$start,
|
|
||||||
$limit,
|
|
||||||
$action,
|
|
||||||
$filter,
|
|
||||||
$search,
|
|
||||||
$process,
|
|
||||||
$status,
|
|
||||||
$type,
|
|
||||||
$dateFrom,
|
|
||||||
$dateTo,
|
|
||||||
$callback,
|
|
||||||
$dir,
|
|
||||||
$sort,
|
|
||||||
$category
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
G::LoadClass("applications");
|
|
||||||
|
|
||||||
$apps = new Applications();
|
|
||||||
$data = $apps->searchAll(
|
$data = $apps->searchAll(
|
||||||
$userUid,
|
$userUid,
|
||||||
$start,
|
$start,
|
||||||
@@ -126,7 +84,26 @@ try {
|
|||||||
$dateFrom,
|
$dateFrom,
|
||||||
$dateTo
|
$dateTo
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
$data = $apps->getAll(
|
||||||
|
$userUid,
|
||||||
|
$start,
|
||||||
|
$limit,
|
||||||
|
$action,
|
||||||
|
$filter,
|
||||||
|
$search,
|
||||||
|
$process,
|
||||||
|
$filterStatus,
|
||||||
|
$type,
|
||||||
|
$dateFrom,
|
||||||
|
$dateTo,
|
||||||
|
$callback,
|
||||||
|
$dir,
|
||||||
|
(strpos($sort, ".") !== false) ? $sort : "APP_CACHE_VIEW." . $sort,
|
||||||
|
$category
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['data'] = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($data['data']);
|
$data['data'] = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($data['data']);
|
||||||
$result = G::json_encode($data);
|
$result = G::json_encode($data);
|
||||||
echo $result;
|
echo $result;
|
||||||
|
|||||||
@@ -233,7 +233,6 @@ class Cases
|
|||||||
}
|
}
|
||||||
|
|
||||||
G::LoadClass("applications");
|
G::LoadClass("applications");
|
||||||
$solrEnabled = false;
|
|
||||||
$userUid = $dataList["userId"];
|
$userUid = $dataList["userId"];
|
||||||
$callback = isset( $dataList["callback"] ) ? $dataList["callback"] : "stcCallback1001";
|
$callback = isset( $dataList["callback"] ) ? $dataList["callback"] : "stcCallback1001";
|
||||||
$dir = isset( $dataList["dir"] ) ? $dataList["dir"] : "DESC";
|
$dir = isset( $dataList["dir"] ) ? $dataList["dir"] : "DESC";
|
||||||
@@ -327,70 +326,30 @@ class Cases
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((
|
G::LoadClass("applications");
|
||||||
$action == "todo" || $action == "draft" || $action == "paused" || $action == "sent" ||
|
$apps = new \Applications();
|
||||||
$action == "selfservice" || $action == "unassigned" || $action == "search"
|
$result = $apps->getAll(
|
||||||
) &&
|
$userUid,
|
||||||
(($solrConf = \System::solrEnv()) !== false)
|
$start,
|
||||||
) {
|
$limit,
|
||||||
G::LoadClass("AppSolr");
|
$action,
|
||||||
|
$filter,
|
||||||
|
$search,
|
||||||
|
$process,
|
||||||
|
$status,
|
||||||
|
$type,
|
||||||
|
$dateFrom,
|
||||||
|
$dateTo,
|
||||||
|
$callback,
|
||||||
|
$dir,
|
||||||
|
(strpos($sort, ".") !== false) ? $sort : "APP_CACHE_VIEW." . $sort,
|
||||||
|
$category,
|
||||||
|
true,
|
||||||
|
$paged,
|
||||||
|
$newerThan,
|
||||||
|
$oldestThan
|
||||||
|
);
|
||||||
|
|
||||||
$ApplicationSolrIndex = new \AppSolr(
|
|
||||||
$solrConf["solr_enabled"],
|
|
||||||
$solrConf["solr_host"],
|
|
||||||
$solrConf["solr_instance"]
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($ApplicationSolrIndex->isSolrEnabled() && $solrConf['solr_enabled'] == true) {
|
|
||||||
//Check if there are missing records to reindex and reindex them
|
|
||||||
$ApplicationSolrIndex->synchronizePendingApplications();
|
|
||||||
$solrEnabled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($solrEnabled) {
|
|
||||||
$result = $ApplicationSolrIndex->getAppGridData(
|
|
||||||
$userUid,
|
|
||||||
$start,
|
|
||||||
$limit,
|
|
||||||
$action,
|
|
||||||
$filter,
|
|
||||||
$search,
|
|
||||||
$process,
|
|
||||||
$status,
|
|
||||||
$type,
|
|
||||||
$dateFrom,
|
|
||||||
$dateTo,
|
|
||||||
$callback,
|
|
||||||
$dir,
|
|
||||||
$sort,
|
|
||||||
$category
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
G::LoadClass("applications");
|
|
||||||
$apps = new \Applications();
|
|
||||||
$result = $apps->getAll(
|
|
||||||
$userUid,
|
|
||||||
$start,
|
|
||||||
$limit,
|
|
||||||
$action,
|
|
||||||
$filter,
|
|
||||||
$search,
|
|
||||||
$process,
|
|
||||||
$status,
|
|
||||||
$type,
|
|
||||||
$dateFrom,
|
|
||||||
$dateTo,
|
|
||||||
$callback,
|
|
||||||
$dir,
|
|
||||||
(strpos($sort, ".") !== false)? $sort : "APP_CACHE_VIEW." . $sort,
|
|
||||||
$category,
|
|
||||||
true,
|
|
||||||
$paged,
|
|
||||||
$newerThan,
|
|
||||||
$oldestThan
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!empty($result['data'])) {
|
if (!empty($result['data'])) {
|
||||||
foreach ($result['data'] as &$value) {
|
foreach ($result['data'] as &$value) {
|
||||||
$value = array_change_key_case($value, CASE_LOWER);
|
$value = array_change_key_case($value, CASE_LOWER);
|
||||||
|
|||||||
Reference in New Issue
Block a user