diff --git a/api/v1/entries/storychange.php b/api/v1/entries/storychange.php index b46c4defa4..a9751265d5 100644 --- a/api/v1/entries/storychange.php +++ b/api/v1/entries/storychange.php @@ -22,7 +22,7 @@ class storyChangeEntry extends Entry { $oldStory = $this->loadModel('story')->getByID($storyID); - $fields = 'reviewer,comment,executions,bugs,cases,tasks'; + $fields = 'reviewer,comment,executions,bugs,cases,tasks,reviewedBy,uid'; $this->batchSetPost($fields); $fields = 'title,spec,verify'; $this->batchSetPost($fields, $oldStory); diff --git a/module/story/control.php b/module/story/control.php index 97df529782..80be7c4d96 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -988,6 +988,8 @@ class story extends control $version = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch('version'); $files = $this->loadModel('file')->saveUpload($story->type, $storyID, $version); + if(empty($files) and $this->post->uid != '') $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]); + if($this->post->comment != '' or !empty($changes) or !empty($files)) { $action = (!empty($changes) or !empty($files)) ? 'Changed' : 'Commented'; diff --git a/module/task/control.php b/module/task/control.php index f869833fb1..a6ff6fd9c6 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -459,10 +459,7 @@ class task extends control $changes = $this->task->update($taskID); if(dao::isError()) return print(js::error(dao::getError())); $files = $this->loadModel('file')->saveUpload('task', $taskID); - if(empty($files) and $this->post->uid != '') - { - $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]); - } + if(empty($files) and $this->post->uid != '') $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]); } $task = $this->task->getById($taskID);