BUG 11214 "No se realiza la paginacion correcta en..." SOLVED
- No se realiza la paginacion correcta en admin->logs->cron. - Problema resuelto, paginacion se muestra correctamente ejemplo page 1 of 5, page 2 of 5, etc. * Available from version ProcessMaker-2.0.47 (2.5.1)
This commit is contained in:
@@ -75,7 +75,6 @@ function cronArraySet ($str, $filter)
|
|||||||
|
|
||||||
function cronDataGet ($filter, $r, $i)
|
function cronDataGet ($filter, $r, $i)
|
||||||
{
|
{
|
||||||
$r = $r + 1; //+ 1, to determine the next page
|
|
||||||
$i = $i + 1;
|
$i = $i + 1;
|
||||||
|
|
||||||
$arrayData = array ();
|
$arrayData = array ();
|
||||||
@@ -85,66 +84,29 @@ function cronDataGet ($filter, $r, $i)
|
|||||||
|
|
||||||
$file = PATH_DATA . "log" . PATH_SEP . "cron.log";
|
$file = PATH_DATA . "log" . PATH_SEP . "cron.log";
|
||||||
|
|
||||||
if (file_exists( $file )) {
|
if (file_exists($file)) {
|
||||||
$fh = fopen( $file, "r" );
|
$arrayFileData = file($file);
|
||||||
|
|
||||||
for ($pos = 0; fseek( $fh, $pos, SEEK_END ) !== - 1; $pos --) {
|
for ($k = 0; $k <= count($arrayFileData) - 1; $k++) {
|
||||||
$char = fgetc( $fh );
|
$strAux = $arrayFileData[$k];
|
||||||
|
|
||||||
if ($char == "\n") {
|
if (!empty($strAux)) {
|
||||||
$strAux = trim( $strAux );
|
$arrayAux = cronArraySet($strAux, $filter);
|
||||||
|
|
||||||
if (! empty( $strAux )) {
|
if (count($arrayAux) > 0) {
|
||||||
$arrayAux = cronArraySet( $strAux, $filter );
|
$cont = $cont + 1;
|
||||||
|
|
||||||
if (count( $arrayAux ) > 0) {
|
if ($cont >= $i && count($arrayData) + 1 <= $r) {
|
||||||
$cont = $cont + 1;
|
$arrayData[] = $arrayAux;
|
||||||
|
|
||||||
if ($cont >= $i && count( $arrayData ) + 1 <= $r) {
|
|
||||||
$arrayData[] = $arrayAux;
|
|
||||||
$numRec = $cont;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count( $arrayData ) == $r) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$strAux = null;
|
|
||||||
$char = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$strAux = $char . $strAux;
|
|
||||||
}
|
|
||||||
|
|
||||||
$strAux = trim( $strAux );
|
|
||||||
|
|
||||||
if (! empty( $strAux )) {
|
|
||||||
$arrayAux = cronArraySet( $strAux, $filter );
|
|
||||||
|
|
||||||
if (count( $arrayAux ) > 0) {
|
|
||||||
$cont = $cont + 1;
|
|
||||||
|
|
||||||
if ($cont >= $i && count( $arrayData ) + 1 <= $r) {
|
|
||||||
$arrayData[] = $arrayAux;
|
|
||||||
$numRec = $cont;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose( $fh );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Delete element
|
$numRec = $cont;
|
||||||
$r = $r - 1;
|
|
||||||
|
|
||||||
if (count( $arrayData ) > $r) {
|
return array($numRec, $arrayData);
|
||||||
$arrayAux = array_pop( $arrayData );
|
|
||||||
}
|
|
||||||
|
|
||||||
return array ($numRec,$arrayData
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$option = (isset( $_REQUEST["option"] )) ? $_REQUEST["option"] : null;
|
$option = (isset( $_REQUEST["option"] )) ? $_REQUEST["option"] : null;
|
||||||
|
|||||||
Reference in New Issue
Block a user