Merge branch 'w03_MDL-31171_m23_blogattachment' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2012-01-17 01:31:59 +01:00
+4 -4
View File
@@ -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) {