* finish the task #615.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-11-10 09:05:32 +00:00
parent a144cc9cf8
commit 9dbcac4d2c
2 changed files with 11 additions and 4 deletions
+9 -2
View File
@@ -255,7 +255,7 @@ class testtask extends control
* @access public
* @return void
*/
public function linkCase($taskID)
public function linkCase($taskID, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
if(!empty($_POST))
{
@@ -270,6 +270,10 @@ class testtask extends control
$task = $this->testtask->getById($taskID);
$productID = $this->product->saveState($task->product, $this->products);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Build the search form. */
$this->loadModel('testcase');
$this->config->testcase->search['params']['product']['values']= array($productID => $this->products[$productID], 'all' => $this->lang->testcase->allProduct);
@@ -292,8 +296,11 @@ class testtask extends control
->andWhere('product')->eq($productID)
->andWhere('id')->notIN($linkedCases)
->andWhere('deleted')->eq(0)
->orderBy('id desc')->fetchAll();
->orderBy('id desc')
->page($pager)
->fetchAll();
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->pager = $pager;
$this->display();
}