* merge from 15.0.beta3.
This commit is contained in:
@@ -124,10 +124,11 @@ class program extends control
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$projectID = $this->program->create();
|
||||
$programID = $this->program->create();
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $programID));
|
||||
|
||||
$this->loadModel('action')->create('program', $projectID, 'opened');
|
||||
$this->loadModel('action')->create('program', $programID, 'opened');
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,9 @@ class programModel extends model
|
||||
*/
|
||||
public function getByID($programID = 0)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_PROGRAM)->where('id')->eq($programID)->andWhere('`type`')->eq('program')->fetch();
|
||||
$program = $this->dao->select('*')->from(TABLE_PROGRAM)->where('id')->eq($programID)->andWhere('`type`')->eq('program')->fetch();
|
||||
$program = $this->loadModel('file')->replaceImgURL($program, 'desc');
|
||||
return $program;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user