* Add id for checking unique field.

This commit is contained in:
daitingting
2022-05-09 07:56:17 +00:00
parent 96e460c47d
commit e30acad1f2
16 changed files with 67 additions and 6 deletions
+12 -1
View File
@@ -734,8 +734,15 @@ class testtaskModel extends model
public function update($taskID)
{
$oldTask = $this->dao->select("*")->from(TABLE_TESTTASK)->where('id')->eq((int)$taskID)->fetch();
$task = fixer::input('post')->stripTags($this->config->testtask->editor->edit['id'], $this->config->allowedTags)->join('mailto', ',')->join('type', ',')->remove('files,labels,uid,comment,contactListMenu')->get();
$task = fixer::input('post')
->add('id')
->stripTags($this->config->testtask->editor->edit['id'], $this->config->allowedTags)
->join('mailto', ',')
->join('type', ',')
->remove('files,labels,uid,comment,contactListMenu')
->get();
$task = $this->loadModel('file')->processImgURL($task, $this->config->testtask->editor->edit['id'], $this->post->uid);
$this->dao->update(TABLE_TESTTASK)->data($task)
->autoCheck()
->batchcheck($this->config->testtask->edit->requiredFields, 'notempty')
@@ -743,6 +750,7 @@ class testtaskModel extends model
->checkFlow()
->where('id')->eq($taskID)
->exec();
if(!dao::isError())
{
$this->file->updateObjectID($this->post->uid, $taskID, 'testtask');
@@ -762,6 +770,7 @@ class testtaskModel extends model
{
$oldTesttask = $this->getById($taskID);
$testtask = fixer::input('post')
->add('id', $taskID)
->setDefault('status', 'doing')
->remove('comment')->get();
@@ -784,6 +793,7 @@ class testtaskModel extends model
{
$oldTesttask = $this->getById($taskID);
$testtask = fixer::input('post')
->add('id', $taskID)
->setDefault('status', 'done')
->stripTags($this->config->testtask->editor->close['id'], $this->config->allowedTags)
->join('mailto', ',')
@@ -826,6 +836,7 @@ class testtaskModel extends model
{
$oldTesttask = $this->getById($taskID);
$testtask = fixer::input('post')
->add('id', $taskID)
->setDefault('status', 'blocked')
->remove('comment')->get();