* Finish task#38179.

This commit is contained in:
qiyu-xie
2021-05-12 15:34:37 +08:00
parent 9fd362073f
commit 53fc060547
4 changed files with 14 additions and 2 deletions
+5 -2
View File
@@ -34,7 +34,7 @@ class testtaskModel extends model
->stripTags($this->config->testtask->editor->create['id'], $this->config->allowedTags)
->join('mailto', ',')
->join('type', ',')
->remove('uid,contactListMenu')
->remove('files,labels,uid,contactListMenu')
->get();
$task = $this->loadModel('file')->processImgURL($task, $this->config->testtask->editor->create['id'], $this->post->uid);
@@ -50,6 +50,7 @@ class testtaskModel extends model
{
$taskID = $this->dao->lastInsertID();
$this->file->updateObjectID($this->post->uid, $taskID, 'testtask');
$this->file->saveUpload('testtask', $taskID);
return $taskID;
}
}
@@ -268,6 +269,7 @@ class testtaskModel extends model
$task = $this->loadModel('file')->replaceImgURL($task, 'desc');
if($setImgSize) $task->desc = $this->loadModel('file')->setImgSize($task->desc);
$task->files = $this->loadModel('file')->getByObject('testtask', $task->id);
return $task;
}
@@ -731,7 +733,7 @@ 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('uid,comment,contactListMenu')->get();
$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 = $this->loadModel('file')->processImgURL($task, $this->config->testtask->editor->edit['id'], $this->post->uid);
$this->dao->update(TABLE_TESTTASK)->data($task)
->autoCheck()
@@ -742,6 +744,7 @@ class testtaskModel extends model
if(!dao::isError())
{
$this->file->updateObjectID($this->post->uid, $taskID, 'testtask');
$this->file->saveUpload('testtask', $taskID);
return common::createChanges($oldTask, $task);
}
}