Merged 3.0.1.8 into MT-10

This commit is contained in:
Gustavo Cruz
2016-03-31 14:13:31 -04:00
11 changed files with 2402 additions and 2336 deletions

View File

@@ -1182,7 +1182,7 @@ class TimerEvent
//Start Timer-Event (start new case) ///////////////////////////////////////////////////////////////////////
$common->frontEndShow("START");
$this->log("START-NEW-CASES", "Date \"$datetime\": Start new cases");
$this->log("START-NEW-CASES", "Date \"$datetime (UTC +00:00)\": Start new cases");
//Query
$criteria = $this->getTimerEventCriteria();
@@ -1349,17 +1349,17 @@ class TimerEvent
}
if (!$flagRecord) {
$common->frontEndShow("TEXT", "Not exists any record to start a new case, on date \"$datetime\"");
$common->frontEndShow("TEXT", "Not exists any record to start a new case, on date \"$datetime (UTC +00:00)\"");
$this->log("NO-RECORDS", "Not exists any record to start a new case");
}
$common->frontEndShow("END");
$this->log("END-NEW-CASES", "Date \"$datetime\": End new cases");
$this->log("END-NEW-CASES", "Date \"$datetime (UTC +00:00)\": End new cases");
//Intermediate Catch Timer-Event (continue the case) ///////////////////////////////////////////////////////
$this->log("START-CONTINUE-CASES", "Date \"$datetime\": Start continue the cases");
$this->log("START-CONTINUE-CASES", "Date \"$datetime (UTC +00:00)\": Start continue the cases");
//Query
$criteriaMain = $this->getTimerEventCriteria();
@@ -1555,14 +1555,14 @@ class TimerEvent
} while ($flagNextRecord);
if (!$flagRecord) {
$common->frontEndShow("TEXT", "Not exists any record to continue a case, on date \"$datetime\"");
$common->frontEndShow("TEXT", "Not exists any record to continue a case, on date \"$datetime (UTC +00:00)\"");
$this->log("NO-RECORDS", "Not exists any record to continue a case");
}
$common->frontEndShow("END");
$this->log("END-CONTINUE-CASES", "Date \"$datetime\": End continue the cases");
$this->log("END-CONTINUE-CASES", "Date \"$datetime (UTC +00:00)\": End continue the cases");
} catch (\Exception $e) {
throw $e;
}

View File

@@ -170,9 +170,6 @@ class Light extends Api
}
/*----------------------------------********---------------------------------*/
if ($newerThan != '') {
$response['data'] = array_reverse($response['data']);
}
$result = $this->parserDataTodo($response['data']);
return DateTime::convertUtcToIso8601($result, $this->arrayFieldIso8601);
} catch (\Exception $e) {
@@ -264,9 +261,6 @@ class Light extends Api
}
/*----------------------------------********---------------------------------*/
if ($newerThan != '') {
$response['data'] = array_reverse($response['data']);
}
$result = $this->parserDataDraft($response['data']);
return DateTime::convertUtcToIso8601($result, $this->arrayFieldIso8601);
} catch (\Exception $e) {
@@ -367,9 +361,6 @@ class Light extends Api
}
/*----------------------------------********---------------------------------*/
if ($newerThan != '') {
$response['data'] = array_reverse($response['data']);
}
$result = $this->parserDataParticipated($response['data']);
return DateTime::convertUtcToIso8601($result, $this->arrayFieldIso8601);
} catch (\Exception $e) {
@@ -835,6 +826,13 @@ class Light extends Api
{
try {
$oCase = new \Cases();
$oAppDelegate = new \AppDelegation();
$alreadyRouted = $oAppDelegate->alreadyRouted($app_uid, $cas_index);
if ($alreadyRouted) {
throw (new RestException(Api::STAT_APP_EXCEPTION, G::LoadTranslation('ID_CASE_DELEGATION_ALREADY_CLOSED')));
}
$userUid = $this->getUserId();
$_SESSION["APPLICATION"] = $app_uid;
$_SESSION["PROCESS"] = $pro_uid;