Merge branch 'w03_MDL-31171_m23_blogattachment' of git://github.com/skodak/moodle
This commit is contained in:
+4
-4
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user