* refactor.

This commit is contained in:
Catouse
2020-05-07 14:50:59 +08:00
parent 923a3cd538
commit 8b45bf767d
3 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -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);
}
+2 -2
View File
@@ -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');
}
}