Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-31171 fix blog attachment serving in BLOG_USER_LEVEL

  • Loading branch information...
commit 5274209ac1427a88a992a9d7431697e47d20fdee 1 parent f70f6e9
@skodak skodak authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/filelib.php
View
8 lib/filelib.php
@@ -3187,6 +3187,10 @@ function file_pluginfile($relativepath, $forcedownload) {
print_error('siteblogdisable', 'blog');
}
+ $entryid = (int)array_shift($args);
+ if (!$entry = $DB->get_record('post', array('module'=>'blog', 'id'=>$entryid))) {
+ send_file_not_found();
+ }
if ($CFG->bloglevel < BLOG_GLOBAL_LEVEL) {
require_login();
if (isguestuser()) {
@@ -3198,10 +3202,6 @@ function file_pluginfile($relativepath, $forcedownload) {
}
}
}
- $entryid = (int)array_shift($args);
- if (!$entry = $DB->get_record('post', array('module'=>'blog', 'id'=>$entryid))) {
- send_file_not_found();
- }
if ('publishstate' === 'public') {
if ($CFG->forcelogin) {
Please sign in to comment.
Something went wrong with that request. Please try again.