From 88f22c48a55407a642ccdddf738e86ee69fe31c5 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Fri, 30 Oct 2009 01:56:33 +0000 Subject: [PATCH] * rember the recPerpage. --- module/project/control.php | 14 ++++++++------ module/project/view/task.html.php | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index d0da928b28..88c3da38e6 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -93,12 +93,14 @@ class project extends control $tasks = $this->task->getProjectTasks($projectID, $orderBy, $pager); /* 赋值。*/ - $this->assign('header', $header); - $this->assign('position', $position); - $this->assign('tasks', $tasks); - $this->assign('tabID', 'task'); - $this->assign('pager', $pager->get()); - $this->assign('orderBy', $orderBy); + $this->assign('header', $header); + $this->assign('position', $position); + $this->assign('tasks', $tasks); + $this->assign('tabID', 'task'); + $this->assign('pager', $pager->get()); + $this->assign('recTotal', $pager->recTotal); + $this->assign('recPerPage', $pager->recPerPage); + $this->assign('orderBy', $orderBy); $this->display(); } diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index fb7aa3b40a..de98d320b8 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -38,7 +38,7 @@ function selectProject(projectID) ' . html::a($this->createLink('task', 'create', "project=$project->id"), $lang->task->create) . ''; - $app->global->vars = "projectID=$project->id"; + $app->global->vars = "projectID=$project->id&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage"; $app->global->orderBy = $orderBy; function printOrderLink($fieldName) { @@ -52,7 +52,7 @@ function selectProject(projectID) { $orderBy = $fieldName . '|' . 'asc'; } - $link = helper::createLink('project', 'task', $app->global->vars ."&orderBy=$orderBy"); + $link = helper::createLink('project', 'task', sprintf($app->global->vars, $orderBy)); $fieldName = str_replace('`', '', $fieldName); echo html::a($link, $lang->task->$fieldName); }