Skip to content

Commit

Permalink
fix(target): fix warnings in timeline when no fiel uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Nov 14, 2017
1 parent 6d6de39 commit 9c94128
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions inc/targetbase.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -772,10 +772,14 @@ protected function parseTags($content, PluginFormcreatorForm_Answer $formanswer,
} else {
if (strpos($content, '##answer_' . $id . '##') !== false) {
$content = str_replace('##question_' . $id . '##', $name, $content);
$content = str_replace('##answer_' . $id . '##', __('Attached document', 'formcreator'), $content);

// keep the ID of the document
$this->attachedDocuments[$value] = true;
if ($value !== '') {
$content = str_replace('##answer_' . $id . '##', __('Attached document', 'formcreator'), $content);

// keep the ID of the document
$this->attachedDocuments[$value] = true;
} else {
$content = str_replace('##answer_' . $id . '##', __('No document', 'formcreator'), $content);
}
}
}
}
Expand Down

0 comments on commit 9c94128

Please sign in to comment.