From 7c5381cadec20fbdddc1f7c34bce8ebe4f3a8fca Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 3 Dec 2020 15:45:06 +0800 Subject: [PATCH] * Fix bug#3677. --- module/testreport/control.php | 1 + module/testreport/view/view.html.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/testreport/control.php b/module/testreport/control.php index e51a5e5bdb..abde4d2f66 100644 --- a/module/testreport/control.php +++ b/module/testreport/control.php @@ -72,6 +72,7 @@ class testreport extends control $tasks = explode(',', $report->tasks); if(count($tasks) != count($taskIdList) or array_diff($tasks, $taskIdList)) unset($reports[$reportID]); } + $pager->setRecTotal(count($reports)); } if(empty($reports) and common::hasPriv('testreport', 'create')) diff --git a/module/testreport/view/view.html.php b/module/testreport/view/view.html.php index 363066263b..69545c7882 100644 --- a/module/testreport/view/view.html.php +++ b/module/testreport/view/view.html.php @@ -114,7 +114,7 @@ objectID&objectType=$report->objectType"), "", '', "class='btn' title='{$lang->testreport->recreate}'"); + if(common::hasPriv('testreport', 'create')) echo html::a(inLink('create', "objectID=$report->objectID&objectType=$report->objectType&extra=$report->id"), "", '', "class='btn' title='{$lang->testreport->recreate}'"); common::printIcon('testreport', 'edit', "reportID=$report->id", '', 'button'); common::printIcon('testreport', 'delete', "reportID=$report->id", '', 'button', 'trash', 'hiddenwin'); }