Skip to content

Commit

Permalink
fix #4007: Erstes Log fehlt in Druckansicht
Browse files Browse the repository at this point in the history
  • Loading branch information
following5 authored and following committed Aug 6, 2012
1 parent 86d54b9 commit 1065f2a
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions htdocs/viewcache.php
Expand Up @@ -192,29 +192,29 @@ function getChildWaypoints($cacheid)


/* begin insertion/change Uwe 20091215 for printing purposes /* begin insertion/change Uwe 20091215 for printing purposes
reworked on 20100106 for better performance after Olivers intervention reworked on 20100106 for better performance after Olivers intervention
rewritten 2012-07-22 following for bugfix, first log was lost in print
*/ */
// See how many logs are in the db for the cache if logprinting is selected
// If not or just five logs may printed, the system will set this fixed values for calling the DB.


$rscount = 99; //Preset the value $rscount = 5;
$rsreturn = array(88); //Preset the value


if(isset($_REQUEST['log']) && $_REQUEST['log'] == 'N'){ if (isset($_REQUEST['log']))
$rscount = 0; switch ($_REQUEST['log'])

{
}elseif (isset($_REQUEST['log']) && $_REQUEST['log'] == 'A'){ case 'N': $rscount = 0;
$rsreturn = cache::getLogsCount($cacheid); break;
$rscount = current($rsreturn);
}else{ case 'A': $rscount = current(cache::getLogsCount($cacheid));
$rscount = 5; break;
}

default: if ($_REQUEST['log'] > 0)
$tpl->assign('logcount', $rscount); $rscount = $_REQUEST['log'] + 0;
$logs = cache::getLogsArray($cacheid, 0, $rscount); }

$logs = cache::getLogsArray($cacheid, 0, $rscount+1);


if (isset($logs[$rscount-1])) if (isset($logs[$rscount]))
{ {
unset($logs[$rscount-1]); unset($logs[$rscount]);
$tpl->assign('showalllogs', true); $tpl->assign('showalllogs', true);
} }
$loganz = sizeof($logs); $loganz = sizeof($logs);
Expand Down

0 comments on commit 1065f2a

Please sign in to comment.