Skip to content

Commit 56b9ea9

Browse files
committed
fixed images in comments not being displayed
1 parent bc190a3 commit 56b9ea9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ function pdfannotator_pluginfile($course, $cm, $context, $filearea, $args, $forc
426426
array_shift($args);
427427
$relativepath = implode('/', $args);
428428
$fullpath = rtrim("/$context->id/mod_pdfannotator/$filearea/$commentid/$relativepath", '/');
429-
if (!$file = $fs->get_file_by_hash(sha1($fullpath)) || $file->is_directory()) {
429+
$file = $fs->get_file_by_hash(sha1($fullpath));
430+
if (!$file || $file->is_directory()) {
430431
// Annotations from other documents might have another contextid.
431432
$pdfid = $DB->get_record('pdfannotator_comments', ['id' => $commentid], 'pdfannotatorid');
432433
if ($pdfid) {

0 commit comments

Comments
 (0)