MDL-57569 core_files: Fix to let show generated f3 image
authorSara Arjona <sara@moodle.com>
Tue, 21 Nov 2017 13:45:26 +0000 (14:45 +0100)
committerSara Arjona <sara@moodle.com>
Fri, 24 Nov 2017 10:48:32 +0000 (11:48 +0100)
lib/filelib.php

index 0e17a81..6b4f1dc 100644 (file)
@@ -4088,7 +4088,7 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null, $offlin
         $filename = array_pop($args);
 
         if ($filearea === 'badgeimage') {
-            if ($filename !== 'f1' && $filename !== 'f2') {
+            if ($filename !== 'f1' && $filename !== 'f2' && $filename !== 'f3') {
                 send_file_not_found();
             }
             if (!$file = $fs->get_file($context->id, 'badges', 'badgeimage', $badge->id, '/', $filename.'.png')) {