BUG-13421 Ordenamiento en el listado de procesos 'Designer'.
Correccion ordenamiento paginacion cuando se realizan busquedas.
This commit is contained in:
@@ -870,8 +870,11 @@ class Process extends BaseProcess
|
||||
} else {
|
||||
usort( $dataMemcache, array($this, "ordProcessDesc") );
|
||||
}
|
||||
$response = new stdclass();
|
||||
$response->totalCount = count($dataMemcache);
|
||||
$dataMemcache = array_splice($dataMemcache, $start, $limit);
|
||||
return $dataMemcache;
|
||||
$response->dataMemcache = $dataMemcache;
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function ordProcessAsc ($a, $b)
|
||||
|
||||
@@ -48,11 +48,15 @@ if (isset( $_POST['category'] ) && $_POST['category'] !== '<reset>') {
|
||||
$memkey = 'processList-' . $start . '-' . $limit . '-' . $_POST['processName'];
|
||||
$memcacheUsed = 'yes';
|
||||
$proData = $memcache->get( $memkey );
|
||||
$proData = $oProcess->orderMemcache($proData, $start, $limit);
|
||||
if ($proData === false) {
|
||||
$proData = $oProcess->getAllProcesses( $start, $limit, null, $_POST['processName']);
|
||||
$memcache->set( $memkey, $proData, PMmemcached::ONE_HOUR );
|
||||
$totalCount = $oProcess->getAllProcessesCount();
|
||||
$memcacheUsed = 'no';
|
||||
} else {
|
||||
$proData = $oProcess->orderMemcache($proData, $start, $limit);
|
||||
$totalCount = $proData->totalCount;
|
||||
$proData = $proData->dataMemcache;
|
||||
}
|
||||
} else {
|
||||
$memkey = 'processList-allProcesses-' . $start . '-' . $limit;
|
||||
@@ -66,6 +70,8 @@ if (isset( $_POST['category'] ) && $_POST['category'] !== '<reset>') {
|
||||
$memcacheUsed = 'no';
|
||||
} else {
|
||||
$proData = $oProcess->orderMemcache($proData, $start, $limit);
|
||||
$totalCount = $proData->totalCount;
|
||||
$proData = $proData->dataMemcache;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user