web: fix bug that shows 21 tasks instead of 20. Fixes #1853.

This commit is contained in:
David Anderson 2017-04-07 16:37:11 -07:00
parent 8872445b57
commit ce4cd94644
1 changed files with 6 additions and 5 deletions

View File

@ -45,10 +45,10 @@ if (!$show_names) $show_names=0;
$s = $state_name[$state];
if ($appid) {
$app = BoincApp::lookup_id($appid);
if ($app) {
$s .= " $app->user_friendly_name ";
}
$app = BoincApp::lookup_id($appid);
if ($app) {
$s .= " $app->user_friendly_name ";
}
}
if ($hostid) {
@ -92,11 +92,12 @@ $info->state = $state;
$info->appid = $appid;
$nav = result_navigation($info, $clause);
$i = 0;
if (count($results)) {
echo $nav;
result_table_start(true, $show_host_link, $info);
foreach ($results as $result) {
if ($i >= $results_per_page) break;
if ($i++ >= $results_per_page) break;
show_result_row($result, true, $show_host_link, $show_names);
}
end_table();