Skip to content

Commit

Permalink
fix(filefield): show download links when field is read only
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Jan 22, 2020
1 parent 819f1a8 commit dc6905f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/fields/filefield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public function displayField($canEdit = true) {
]);
} else {
$doc = new Document();
$answer = $this->value;
if (!is_array($this->value)) {
$answer = [$this->value];
$answer = $this->uploadData;
if (!is_array($this->uploadData)) {
$answer = [$this->uploadData];
}
foreach ($answer as $item) {
if (is_numeric($item) && $doc->getFromDB($item)) {
Expand Down

0 comments on commit dc6905f

Please sign in to comment.