From 4e165e290d103f68192f70ee80ddd13b0c60d92e Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Mon, 13 Sep 2010 12:51:11 +0000 Subject: [PATCH] * fix bug #121. --- module/testtask/model.php | 4 ++-- module/testtask/view/linkcase.html.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index 081e2accae..0b20e5b083 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -87,11 +87,11 @@ class testtaskModel extends model public function linkCase($taskID) { if($this->post->cases == false) return; - foreach($this->post->cases as $key => $caseID) + foreach($this->post->cases as $caseID) { $row->task = $taskID; $row->case = $caseID; - $row->version = $this->post->versions[$key]; + $row->version = $this->post->versions[$caseID]; $row->assignedTo = ''; $row->status = 'wait'; $this->dao->replace(TABLE_TESTRUN)->data($row)->exec(); diff --git a/module/testtask/view/linkcase.html.php b/module/testtask/view/linkcase.html.php index 0e58c2b0e4..3b65455f76 100644 --- a/module/testtask/view/linkcase.html.php +++ b/module/testtask/view/linkcase.html.php @@ -72,7 +72,7 @@ function checkall(checker) testcase->statusList[$case->status];?> - version, 1), range($case->version, 1)), '', 'style=width:50px');?> + id]", array_combine(range($case->version, 1), range($case->version, 1)), '', 'style=width:50px');?>