diff --git a/module/design/control.php b/module/design/control.php index c85a751cda..40d4fff3d9 100644 --- a/module/design/control.php +++ b/module/design/control.php @@ -110,7 +110,7 @@ class design extends control $this->view->users = $this->loadModel('user')->getPairs('noclosed'); $this->view->stories = $this->loadModel('story')->getProductStoryPairs($productID); $this->view->productID = $productID; - $this->view->program = $this->loadModel('project')->getByID($this->session->PRJ); + $this->view->project = $this->loadModel('program')->getPRJByID($this->session->PRJ); $this->display(); } @@ -214,9 +214,9 @@ class design extends control $this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->edit; $this->view->position[] = $this->lang->design->edit; - $this->view->design = $design; - $this->view->program = $this->loadModel('project')->getByID($this->session->PRJ); - $this->view->stories = $this->loadModel('story')->getProductStoryPairs($design->product); + $this->view->design = $design; + $this->view->project = $this->loadModel('program')->getPRJByID($this->session->PRJ); + $this->view->stories = $this->loadModel('story')->getProductStoryPairs($design->product); $this->display(); } @@ -236,9 +236,9 @@ class design extends control */ public function linkCommit($designID = 0, $repoID = 0, $begin = '', $end = '', $recTotal = 0, $recPerPage = 50, $pageID = 1) { - /* Get program and date. */ - $program = $this->loadModel('project')->getByID($this->session->PRJ); - $begin = $begin ? date('Y-m-d', strtotime($begin)) : $program->begin; + /* Get project and date. */ + $project = $this->loadModel('program')->getPRJByID($this->session->PRJ); + $begin = $begin ? date('Y-m-d', strtotime($begin)) : $project->begin; $end = $end ? date('Y-m-d', strtotime($end)) : helper::today(); /* Get the repository information through the repoID. */ diff --git a/module/design/model.php b/module/design/model.php index fff8004a34..4d61aeec0b 100644 --- a/module/design/model.php +++ b/module/design/model.php @@ -292,7 +292,7 @@ class designModel extends model * Get design list. * * @param int $productID - * @param int $programID + * @param int $projectID * @param string $type all|bySearch|HLDS|DDS|DBDS|ADS * @param int $param * @param string $orderBy @@ -300,17 +300,17 @@ class designModel extends model * @access public * @return array */ - public function getList($programID = 0, $productID = 0, $type = 'all', $param = 0, $orderBy = 'id_desc', $pager = null) + public function getList($projectID = 0, $productID = 0, $type = 'all', $param = 0, $orderBy = 'id_desc', $pager = null) { if($type == 'bySearch') { - $designs = $this->getBySearch($programID, $productID, $param, $orderBy, $pager); + $designs = $this->getBySearch($projectID, $productID, $param, $orderBy, $pager); } else { $designs = $this->dao->select('*')->from(TABLE_DESIGN) ->where('deleted')->eq(0) - ->beginIF($programID)->andWhere('PRJ')->eq($programID)->fi() + ->beginIF($projectID)->andWhere('PRJ')->eq($projectID)->fi() ->beginIF($type != 'all')->andWhere('type')->in($type)->fi() ->andWhere('product')->eq($productID) ->orderBy($orderBy) @@ -341,7 +341,7 @@ class designModel extends model /** * Get designs by search. * - * @param int $programID + * @param int $projectID * @param int $productID * @param int $queryID * @param string $orderBy @@ -349,7 +349,7 @@ class designModel extends model * @access public * @return object */ - public function getBySearch($programID = 0, $productID = 0, $queryID = 0, $orderBy = 'id_desc', $pager = null) + public function getBySearch($projectID = 0, $productID = 0, $queryID = 0, $orderBy = 'id_desc', $pager = null) { if($queryID) { @@ -374,7 +374,7 @@ class designModel extends model $designs = $this->dao->select('*')->from(TABLE_DESIGN) ->where($designQuery) ->andWhere('deleted')->eq('0') - ->andWhere('PRJ')->eq($programID) + ->andWhere('PRJ')->eq($projectID) ->andWhere('product')->eq($productID) ->orderBy($orderBy) ->page($pager) diff --git a/module/design/view/create.html.php b/module/design/view/create.html.php index 38b875b48b..258cfb5dfa 100644 --- a/module/design/view/create.html.php +++ b/module/design/view/create.html.php @@ -20,14 +20,14 @@