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 712dc61afa..5d86256837 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1003,6 +1003,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 943641bc5a..1b83290fd7 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -465,10 +465,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);