This commit is contained in:
liumengyi
2023-03-30 09:10:49 +08:00
parent 9d02ea711e
commit 38ccdd2ea7
+6 -6
View File
@@ -194,9 +194,9 @@ class docModel extends model
public function createLib()
{
$lib = fixer::input('post')
->setForce('product', $this->post->type == 'product' ? $this->post->product : 0)
->setForce('project', $this->post->type == 'project' ? $this->post->project : 0)
->setForce('execution', $this->post->type == 'execution' || $this->post->execution ? $this->post->execution : 0)
->setForce('product', ($this->post->type == 'product' and !empty($_POST['product'])) ? $this->post->product : 0)
->setForce('project', ($this->post->type == 'project' and !empty($_POST['product'])) ? $this->post->project : 0)
->setForce('execution', ($this->post->type == 'execution' or !empty($_POST['execution'])) ? $this->post->execution : 0)
->join('groups', ',')
->join('users', ',')
->add('addedBy', $this->app->user->account)
@@ -238,9 +238,9 @@ class docModel extends model
->trim('name')
->join('groups', ',')
->join('users', ',')
->setForce('product', $libType == 'product' ? $this->post->product : 0)
->setForce('project', $libType == 'project' ? $this->post->project : 0)
->setForce('execution', $libType == 'project' ? $this->post->execution : 0)
->setForce('product', ($libType == 'product' and !empty($_POST['product'])) ? $this->post->product : 0)
->setForce('project', ($libType == 'project' and !empty($_POST['project'])) ? $this->post->project : 0)
->setForce('execution', ($libType == 'project' and !empty($_POST['execution'])) ? $this->post->execution : 0)
->add('addedBy', $this->app->user->account)
->add('addedDate', helper::now())
->remove('uid,contactListMenu,libType')