Skip to content

Commit

Permalink
fixed #4910: Download all files for reponse in browse screen throws e…
Browse files Browse the repository at this point in the history
…n error

dev: shouldn't be an option anyway, the check for existing file question failed for dual scale questions

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@9747 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
mennodekker committed Feb 7, 2011
1 parent 35c16aa commit e8ff36e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions admin/admin_functions.php
Expand Up @@ -105,10 +105,7 @@ function bHasFileUploadQuestion($surveyid) {
$fieldmap = createFieldMap($surveyid);

foreach ($fieldmap as $field) {
foreach ($field as $key => $value) {
if ($value == "|")
return true;
}
if (isset($field['type']) && $field['type'] === '|') return true;
}
}

Expand Down
4 changes: 4 additions & 0 deletions admin/browse.php
Expand Up @@ -254,8 +254,12 @@
{
$browseoutput .= "<img align='left' hspace='0' border='0' src='$imageurl/delete_disabled.png' alt='".$clang->gT("You don't have permission to delete this entry.")."'/>";
}

if (bHasFileUploadQuestion($surveyid))
{
$browseoutput .= "<a href='#' title='".$clang->gTview("Download files for this entry")."' onclick=\" ".get2post($scriptname.'?action=browse&amp;subaction=all&amp;downloadfile='.$id.'&amp;sid='.$surveyid)."\" >"
."<img align='left' hspace='0' border='0' src='$imageurl/download.png' alt='".$clang->gT("Download files for this entry")."' /></a>\n";
}

//Export this response
$browseoutput .= "<a href='$scriptname?action=exportresults&amp;sid=$surveyid&amp;id=$id'" .
Expand Down

0 comments on commit e8ff36e

Please sign in to comment.