Skip to content

Commit

Permalink
Fixed issue #16136: Deleting file attachment does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Apr 20, 2020
1 parent ae16c30 commit cb715a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions application/models/Response.php
Expand Up @@ -85,11 +85,13 @@ public function getFiles($qid = null)
*/
public function getFilesAndSqga($sQID = 0)
{
$aConditions = array('sid' => $this->dynamicId, 'type' => '|', 'language'=>$this->survey->language);
$aConditions = array('sid' => $this->dynamicId, 'type' => '|');
if ($sQID > 0) {
$aConditions['qid'] = $sQID;
}
$aQuestions = Question::model()->findAllByAttributes($aConditions);
$aQuestions = Question::model()
->with(['questionl10ns' => ['language' => $this->survey->language]])
->findAllByAttributes($aConditions);
$files = array();
foreach ($aQuestions as $question) {
$field = $question->sid.'X'.$question->gid.'X'.$question->qid;
Expand Down

0 comments on commit cb715a9

Please sign in to comment.