* Finish task#8969.
This commit is contained in:
@@ -851,7 +851,7 @@ class product extends control
|
||||
$this->view->extra = $extra;
|
||||
$this->view->products = $products;
|
||||
$this->view->projectID = $this->session->PRJ;
|
||||
$this->view->programs = $this->loadModel('program')->getPGMPairs();
|
||||
$this->view->programs = $this->loadModel('program')->getPGMOption();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,20 @@ class programModel extends model
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get program option.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPGMOption()
|
||||
{
|
||||
return $this->dao->select('id,name')->from(TABLE_PROGRAM)
|
||||
->where('type')->eq('program')
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the product associated with the program.
|
||||
*
|
||||
@@ -1718,7 +1732,7 @@ class programModel extends model
|
||||
$PRJProgram = '';
|
||||
if($id == 'PRJProgram' and $project->parent != 0)
|
||||
{
|
||||
$programList = $this->getPGMPairs();
|
||||
$programList = $this->getPGMOption();
|
||||
$programIndex = $programID ? strpos($project->path, (string)$programID) : 0;
|
||||
$projectIndex = strpos($project->path, $project->id);
|
||||
$programPath = explode(',' , substr($project->path, $programIndex, $projectIndex - $programIndex));
|
||||
|
||||
Reference in New Issue
Block a user