Merge pull request #2154 from Jennydmz/BUG-13421

BUG-13421 Arreglando el contador de registros al realizar una busqueda de un proceso en Designer.
This commit is contained in:
julceslauhub
2013-11-21 08:14:04 -08:00
2 changed files with 5 additions and 4 deletions

View File

@@ -755,7 +755,6 @@ class Process extends BaseProcess
} else {
usort( $aProcesses, array($this, "ordProcessDesc") );
}
$aProcesses = array_splice($aProcesses, $start, $limit);
return $aProcesses;
}

View File

@@ -51,7 +51,8 @@ if (isset( $_POST['category'] ) && $_POST['category'] !== '<reset>') {
if ($proData === false) {
$proData = $oProcess->getAllProcesses( $start, $limit, null, $_POST['processName']);
$memcache->set( $memkey, $proData, PMmemcached::ONE_HOUR );
$totalCount = $oProcess->getAllProcessesCount();
$totalCount = count($proData);
$proData = array_splice($proData, $start, $limit);
$memcacheUsed = 'no';
} else {
$proData = $oProcess->orderMemcache($proData, $start, $limit);
@@ -64,7 +65,8 @@ if (isset( $_POST['category'] ) && $_POST['category'] !== '<reset>') {
$memcacheUsed = 'yes';
if (($proData = $memcache->get( $memkey )) === false || ($totalCount = $memcache->get( $memkeyTotal )) === false) {
$proData = $oProcess->getAllProcesses( $start, $limit);
$totalCount = $oProcess->getAllProcessesCount();
$totalCount = count($proData);
$proData = array_splice($proData, $start, $limit);
$memcache->set( $memkey, $proData, PMmemcached::ONE_HOUR );
$memcache->set( $memkeyTotal, $totalCount, PMmemcached::ONE_HOUR );
$memcacheUsed = 'no';