* Fix bug 12732.

This commit is contained in:
holan20180123
2021-06-01 10:09:45 +08:00
parent 2ba2125664
commit 3f446e63a6
2 changed files with 33 additions and 15 deletions
+9 -8
View File
@@ -757,14 +757,15 @@ class projectModel extends model
{
/* If parent not empty, link products or create products. */
$product = new stdclass();
$product->name = $this->post->productName ? $this->post->productName : $project->name;
$product->bind = $this->post->parent ? 0 : 1;
$product->program = $project->parent ? current(array_filter(explode(',', $program->path))) : 0;
$product->acl = $project->acl = 'open' ? 'open' : 'private';
$product->PO = $project->PM;
$product->createdBy = $this->app->user->account;
$product->createdDate = helper::now();
$product->status = 'normal';
$product->name = $this->post->productName ? $this->post->productName : $project->name;
$product->bind = $this->post->parent ? 0 : 1;
$product->program = $project->parent ? current(array_filter(explode(',', $program->path))) : 0;
$product->acl = $project->acl = 'open' ? 'open' : 'private';
$product->PO = $project->PM;
$product->createdBy = $this->app->user->account;
$product->createdDate = helper::now();
$product->status = 'normal';
$product->createdVersion = $this->config->version;
$this->dao->insert(TABLE_PRODUCT)->data($product)->exec();
$productID = $this->dao->lastInsertId();