diff --git a/application/controllers/admin/responses.php b/application/controllers/admin/responses.php index d291378ba73..594026c89d2 100644 --- a/application/controllers/admin/responses.php +++ b/application/controllers/admin/responses.php @@ -244,7 +244,7 @@ public function view($iSurveyID, $iId, $sBrowseLang = '') if ($metadata === "size") $answervalue = rawurldecode(((int) ($phparray[$index][$metadata])) . " KB"); else if ($metadata === "name") - $answervalue = CHtml::link(rawurldecode($phparray[$index][$metadata]), $this->getController()->createUrl("/admin/responses/sa/browse/downloadindividualfile/{$phparray[$index][$metadata]}/fieldname/{$fnames[$i][0]}/id/{$iId}/surveyid/{$iSurveyID}")); + $answervalue = CHtml::link(rawurldecode($phparray[$index][$metadata]), $this->getController()->createUrl("/admin/responses/sa/browse/fieldname/{$fnames[$i][0]}/id/{$iId}/surveyid/{$iSurveyID}",array('downloadindividualfile'=>$phparray[$index][$metadata]))); else $answervalue = rawurldecode($phparray[$index][$metadata]); } @@ -405,7 +405,7 @@ function browse($iSurveyID) for ($i = 0; $i < count($phparray); $i++) { - if ($phparray[$i]['name'] == $downloadindividualfile) + if (rawurldecode($phparray[$i]['name']) == rawurldecode($downloadindividualfile)) { $file = Yii::app()->getConfig('uploaddir') . "/surveys/" . $iSurveyID . "/files/" . $phparray[$i]['filename'];