* Adjust codes.
This commit is contained in:
@@ -1528,7 +1528,7 @@ class projectModel extends model
|
||||
->checkIF($project->begin != '', 'begin', 'date')
|
||||
->checkIF($project->end != '', 'end', 'date')
|
||||
->checkIF($project->end != '', 'end', 'gt', $project->begin)
|
||||
->checkIF(!empty($project->name), 'name', 'unique', "id != $projectID and `type` = 'project' and `parent` = '$project->parent' and `model` = '{$project->model}' and `deleted` = '0'")
|
||||
->checkIF(!empty($project->name), 'name', 'unique', "id != $projectID and `type` = 'project' and `parent` = '$oldProject->parent' and `model` = '{$project->model}' and `deleted` = '0'")
|
||||
->checkIF(!empty($project->code), 'code', 'unique', "id != $projectID and `type` = 'project' and `model` = '{$project->model}' and `deleted` = '0'")
|
||||
->checkFlow()
|
||||
->where('id')->eq($projectID)
|
||||
@@ -1603,7 +1603,7 @@ class projectModel extends model
|
||||
if(!empty($unlinkedProducts))
|
||||
{
|
||||
$products = $this->dao->select('name')->from(TABLE_PRODUCT)->where('id')->in($unlinkedProducts)->fetchPairs();
|
||||
$this->action->create('project', $projectID, 'unlinkproduct', '', implode(',', $products));
|
||||
$this->loadModel('action')->create('project', $projectID, 'unlinkproduct', '', implode(',', $products));
|
||||
}
|
||||
|
||||
/* Activate or close the shadow product of the project. */
|
||||
|
||||
Reference in New Issue
Block a user