From 18de3e20a07241500644b53c1ebe96ce61ba2976 Mon Sep 17 00:00:00 2001 From: ChuJilu Date: Tue, 28 Oct 2014 13:36:36 +0800 Subject: [PATCH] * finish task 2130. --- module/project/control.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module/project/control.php b/module/project/control.php index 3536856069..953a7872d7 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -808,6 +808,9 @@ class project extends control */ public function doc($projectID) { + /* use first project if projectID does not exist. */ + if(!isset($this->projects[$projectID])) $projectID = key($this->projects); + $this->project->setMenu($this->projects, $projectID); $this->session->set('docList', $this->app->getURI(true)); @@ -1250,6 +1253,9 @@ class project extends control */ public function manageProducts($projectID) { + /* use first project if projectID does not exist. */ + if(!isset($this->projects[$projectID])) $projectID = key($this->projects); + $browseProjectLink = $this->createLink('project', 'browse', "projectID=$projectID"); if(!empty($_POST)) { @@ -1566,6 +1572,9 @@ class project extends control $this->session->set('caseList', $uri); $this->session->set('testtaskList', $uri); + /* use first project if projectID does not exist. */ + if(!isset($this->projects[$projectID])) $projectID = key($this->projects); + /* Set the menu. If the projectID = 0, use the indexMenu instead. */ $this->project->setMenu($this->projects, $projectID); if($projectID == 0)