* Code for details.
This commit is contained in:
@@ -332,7 +332,7 @@ class product extends control
|
||||
$this->view->qdUsers = $qdUsers;
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->users = $this->user->getPairs('nodeleted|noclosed');
|
||||
$this->view->programs = array('') + $this->loadModel('program')->getTopPGMPairs();
|
||||
$this->view->programs = array('') + $this->loadModel('program')->getTopPGMPairs('', 'noclosed');
|
||||
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
|
||||
|
||||
unset($this->lang->product->typeList['']);
|
||||
@@ -440,6 +440,7 @@ class product extends control
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$this->product->setMenu($this->products, $productID);
|
||||
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
|
||||
@@ -442,15 +442,16 @@ class programModel extends model
|
||||
* Get top program pairs.
|
||||
*
|
||||
* @param string $model
|
||||
* @param string $mode
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTopPGMPairs($model = '')
|
||||
public function getTopPGMPairs($model = '', $mode = '')
|
||||
{
|
||||
return $this->dao->select('id,name')->from(TABLE_PROGRAM)
|
||||
->where('type')->eq('program')
|
||||
->andWhere('grade')->eq(1)
|
||||
->andWhere('status')->ne('closed')
|
||||
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
|
||||
->andWhere('id')->in($this->app->user->view->programs)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($model)->andWhere('model')->eq($model)->fi()
|
||||
|
||||
Reference in New Issue
Block a user