Merged in cochalo/processmaker (pull request #354)

Arreglo de limit segun config de PM en CASES LIST
This commit is contained in:
erik ao
2014-04-02 11:53:26 -04:00
4 changed files with 16 additions and 16 deletions

View File

@@ -52,7 +52,7 @@ class Restler extends \Luracast\Restler\Restler
}
if ($this->flagMultipart === true) {
$responseTemp['status'] = $this->responseCode;
$responseTemp['response'] = \G::json_decode($this->responseData);
$responseTemp['response'] = json_decode($this->responseData);
$this->responseMultipart = $responseTemp;
} else {
echo $this->responseData;

View File

@@ -79,7 +79,7 @@ class WebApplication
$this->loadEnvironment($request["workspace"]);
Util\Logger::log("API::Dispatching ".$_SERVER["REQUEST_METHOD"]." ".$request["uri"]);
if (isset($_SERVER["HTTP_X_REQUESTED_WITH"]) && \G::toUpper($_SERVER["HTTP_X_REQUESTED_WITH"]) == 'MULTYPART') {
if (isset($_SERVER["HTTP_X_REQUESTED_WITH"]) && strtoupper($_SERVER["HTTP_X_REQUESTED_WITH"]) == 'MULTYPART') {
$this->multipart($request["uri"], $request["version"]);
} else {
$this->dispatchApiRequest($request["uri"], $request["version"]);
@@ -112,10 +112,10 @@ class WebApplication
foreach($input->calls as $value) {
$_SERVER["REQUEST_METHOD"] = (empty($value->method)) ? 'GET' : $value->method;
$uriTemp = trim($baseUrl) . trim($value->url);
$inputExecute = (empty($value->data)) ? '' : \G::json_encode($value->data);
$inputExecute = (empty($value->data)) ? '' : json_encode($value->data);
$this->responseMultipart[] = $this->dispatchApiRequest($uriTemp, $version, true, $inputExecute);
}
echo \G::json_encode($this->responseMultipart);
echo json_encode($this->responseMultipart);
}
/**

View File

@@ -61,7 +61,7 @@ class Cases
if ($start != 0) {
$start--;
}
if ($limit == 'config') {
if ($limit == 'config' || (abs((int)$limit)) == 0) {
G::LoadClass("configuration");
$conf = new \Configurations();
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');

View File

@@ -34,7 +34,7 @@ class Cases extends Api
*/
public function doGetCasesListToDo(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',
@@ -81,7 +81,7 @@ class Cases extends Api
*/
public function doGetCasesListToDoPaged(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',
@@ -128,7 +128,7 @@ class Cases extends Api
*/
public function doGetCasesListDraft(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',
@@ -175,7 +175,7 @@ class Cases extends Api
*/
public function doGetCasesListDraftPaged(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',
@@ -222,7 +222,7 @@ class Cases extends Api
*/
public function doGetCasesListParticipated(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',
@@ -269,7 +269,7 @@ class Cases extends Api
*/
public function doGetCasesListParticipatedPaged(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',
@@ -316,7 +316,7 @@ class Cases extends Api
*/
public function doGetCasesListUnassigned(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',
@@ -363,7 +363,7 @@ class Cases extends Api
*/
public function doGetCasesListUnassignedPaged(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',
@@ -410,7 +410,7 @@ class Cases extends Api
*/
public function doGetCasesListPaused(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',
@@ -457,7 +457,7 @@ class Cases extends Api
*/
public function doGetCasesListPausedPaged(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',
@@ -508,7 +508,7 @@ class Cases extends Api
*/
public function doGetCasesListAdvancedSearch(
$start = 0,
$limit = 25,
$limit = 'config',
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
$dir = 'DESC',
$cat_uid = '',