From 767c1353030f3b0d83f15aea8d05593c534ffa5a Mon Sep 17 00:00:00 2001 From: wyd621 Date: Fri, 2 Aug 2013 10:15:02 +0800 Subject: [PATCH] * fix bug for waring. --- module/common/control.php | 4 ++-- module/project/control.php | 3 ++- module/project/view/doc.html.php | 2 +- module/story/view/view.html.php | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/module/common/control.php b/module/common/control.php index 82baa17b2f..c6ef323199 100644 --- a/module/common/control.php +++ b/module/common/control.php @@ -351,7 +351,7 @@ class common extends control if(isset($preAndNext->pre) and $preAndNext->pre) { - $id = (!$_SESSION[$typeOnlyCondition] and $app->getModuleName() == 'testcase' and isset($preAndNext->pre->case)) ? 'case' : 'id'; + $id = (isset($_SESSION['testcaseOnlyCondition']) and !$_SESSION['testcaseOnlyCondition'] and $app->getModuleName() == 'testcase' and isset($preAndNext->pre->case)) ? 'case' : 'id'; $title = isset($preAndNext->pre->title) ? $preAndNext->pre->title : $preAndNext->pre->name; $title = '#' . $preAndNext->pre->$id . ' ' . $title; echo ""; @@ -360,7 +360,7 @@ class common extends control } if(isset($preAndNext->next) and $preAndNext->next) { - $id = (!$_SESSION[$typeOnlyCondition] and $app->getModuleName() == 'testcase' and isset($preAndNext->next->case)) ? 'case' : 'id'; + $id = (isset($_SESSION['testcaseOnlyCondition']) and !$_SESSION['testcaseOnlyCondition'] and $app->getModuleName() == 'testcase' and isset($preAndNext->next->case)) ? 'case' : 'id'; $title = isset($preAndNext->next->title) ? $preAndNext->next->title : $preAndNext->next->name; $title = '#' . $preAndNext->next->$id . ' ' . $title; echo ""; diff --git a/module/project/control.php b/module/project/control.php index bf7925082c..f7a9ed096d 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -147,7 +147,6 @@ class project extends control { $modules = $this->tree->getProjectModule($projectID, $productID); $tasks = $this->loadModel('task')->getTasksByModule($projectID, $modules, $orderBy, $pager); - $this->view->productID = $productID; } elseif($status == 'byModule') { @@ -213,6 +212,7 @@ class project extends control $this->view->param = $param; $this->view->projectID = $projectID; $this->view->project = $project; + $this->view->productID = $productID; $this->view->moduleID = $moduleID; $this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID = 0, $startModuleID = 0, array('treeModel', 'createTaskLink')); $this->view->projectTree = $this->project->tree(); @@ -504,6 +504,7 @@ class project extends control $this->loadModel('story'); $this->loadModel('user'); $this->loadModel('task'); + $this->app->loadLang('testcase'); /* Save session. */ $this->app->session->set('storyList', $this->app->getURI(true)); diff --git a/module/project/view/doc.html.php b/module/project/view/doc.html.php index ac5ba37fbf..bd608df57e 100644 --- a/module/project/view/doc.html.php +++ b/module/project/view/doc.html.php @@ -37,7 +37,7 @@ ?> id)); else printf('%03d', $doc->id);?> - module]);?> + module]))print($modules[$doc->module]);?> title);?> addedBy];?> addedDate;?> diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 67af5ac0dd..ae483afb1f 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -194,12 +194,13 @@
- tasks as $projectTasks) { foreach($projectTasks as $task) { - @$projectName = $projects[$task->project]; + if(!isset($projects[$task->project])) continue; + $projectName = $projects[$task->project]; echo html::a($this->createLink('project', 'browse', "projectID=$task->project"), $projectName); echo "" . html::a($this->createLink('task', 'view', "taskID=$task->id"), "#$task->id $task->name") . '
'; }