* refactor.
This commit is contained in:
@@ -46,7 +46,7 @@ class program extends control
|
||||
$whitelist = '';
|
||||
$acl = 'open';
|
||||
if($copyProgramID)
|
||||
{
|
||||
{
|
||||
$copyProgram = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($copyProgramID)->fetch();
|
||||
$name = $copyProgram->name;
|
||||
$code = $copyProgram->code;
|
||||
@@ -79,7 +79,7 @@ class program extends control
|
||||
$changes = $this->project->update($projectID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => $this->processErrors(dao::getError())));
|
||||
if($changes)
|
||||
{
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('project', $projectID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class programModel extends model
|
||||
$lib->product = $productID;
|
||||
$lib->name = $this->lang->doclib->main['product'];
|
||||
$lib->type = 'product';
|
||||
$lib->main = '1';
|
||||
$lib->main = '1';
|
||||
$lib->acl = 'default';
|
||||
$this->dao->insert(TABLE_DOCLIB)->data($lib)->exec();
|
||||
|
||||
@@ -114,6 +114,6 @@ class programModel extends model
|
||||
|
||||
public function getProducts($program)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_PRODUCT)->where('project')->eq($program)->fetchAll('id');
|
||||
return $this->dao->select('*')->from(TABLE_PRODUCT)->where('project')->eq($program)->fetchAll('id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user