Merge remote branch 'upstream/master' into pmsql
This commit is contained in:
@@ -175,11 +175,20 @@ function getAllCounters ()
|
||||
$aTypes['selfservice'] = 'CASES_SELFSERVICE';
|
||||
//$aTypes['to_revise'] = 'CASES_TO_REVISE';
|
||||
//$aTypes['to_reassign'] = 'CASES_TO_REASSIGN';
|
||||
$solrEnabled = false;
|
||||
|
||||
if ((($solrConf = System::solrEnv()) !== false)) {
|
||||
G::LoadClass( 'AppSolr' );
|
||||
$ApplicationSolrIndex = new AppSolr( $solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance'] );
|
||||
|
||||
if ($ApplicationSolrIndex->isSolrEnabled()) {
|
||||
$solrEnabled = true;
|
||||
} else {
|
||||
$solrEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($solrEnabled) {
|
||||
$aCount = $ApplicationSolrIndex->getCasesCount( $userUid );
|
||||
|
||||
//get paused count
|
||||
|
||||
@@ -19,6 +19,7 @@ $dateTo = isset( $_POST["dateTo"] ) ? substr( $_POST["dateTo"], 0, 10 ) : "";
|
||||
try {
|
||||
$userUid = (isset($_SESSION["USER_LOGGED"]) && $_SESSION["USER_LOGGED"] != "")? $_SESSION["USER_LOGGED"] : null;
|
||||
$result = "";
|
||||
$solrEnabled = false;
|
||||
|
||||
switch ($action) {
|
||||
case "search":
|
||||
@@ -44,6 +45,16 @@ try {
|
||||
$solrConf["solr_instance"]
|
||||
);
|
||||
|
||||
if ($ApplicationSolrIndex->isSolrEnabled()) {
|
||||
//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,
|
||||
|
||||
Reference in New Issue
Block a user