* [bug#59881,done,0.5h] fix didn't show comment image error.

This commit is contained in:
tianshujie
2025-02-28 16:30:08 +08:00
committed by 刘梦艺
parent 78a1767549
commit ab3be81f4a
2 changed files with 44 additions and 52 deletions
+28 -8
View File
@@ -608,11 +608,16 @@ class testtask extends control
{
$task = $this->testtaskZen->buildTaskForStart($taskID);
$this->testtask->start($task);
$changes = $this->testtask->start($task);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$message = $this->executeHooks($taskID) ?: $this->lang->saveSuccess;
if($changes || $this->post->comment)
{
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'Started', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
$message = $this->executeHooks($taskID) ?: $this->lang->saveSuccess;
return $this->send(array('result' => 'success', 'message' => $message, 'closeModal' => true, 'load' => true));
}
@@ -644,11 +649,16 @@ class testtask extends control
{
$task = $this->testtaskZen->buildTaskForClose($taskID);
$this->testtask->close($task);
$changes = $this->testtask->close($task);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$message = $this->executeHooks($taskID) ?: $this->lang->saveSuccess;
if($changes || $this->post->comment)
{
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'Closed', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
$message = $this->executeHooks($taskID) ?: $this->lang->saveSuccess;
return $this->send(array('result' => 'success', 'message' => $message, 'closeModal' => true, 'load' => true));
}
@@ -680,11 +690,16 @@ class testtask extends control
{
$task = $this->testtaskZen->buildTaskForBlock($taskID);
$this->testtask->block($task);
$changes = $this->testtask->block($task);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$message = $this->executeHooks($taskID) ?: $this->lang->saveSuccess;
if($changes || $this->post->comment)
{
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'Blocked', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
$message = $this->executeHooks($taskID) ?: $this->lang->saveSuccess;
return $this->send(array('result' => 'success', 'message' => $message, 'closeModal' => true, 'load' => true));
}
@@ -716,11 +731,16 @@ class testtask extends control
{
$task = $this->testtaskZen->buildTaskForActivate($taskID);
$this->testtask->activate($task);
$changes = $this->testtask->activate($task);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$message = $this->executeHooks($taskID) ?: $this->lang->saveSuccess;
if($changes || $this->post->comment)
{
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'Activated', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
$message = $this->executeHooks($taskID) ?: $this->lang->saveSuccess;
return $this->send(array('result' => 'success', 'message' => $message, 'closeModal' => true, 'load' => true));
}