From ce4cd94644e2e48f2b82dbd7db680e1b63f271ed Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 7 Apr 2017 16:37:11 -0700 Subject: [PATCH] web: fix bug that shows 21 tasks instead of 20. Fixes #1853. --- html/user/results.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/html/user/results.php b/html/user/results.php index 0d5d6610e5..a308d5a73c 100644 --- a/html/user/results.php +++ b/html/user/results.php @@ -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();