From 673bc55dc2a5c36ba0e9b864a29177a6e425dbc1 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 7 Oct 2007 09:27:13 +0000 Subject: [PATCH] Merged blog theme/lang fixes from MDL-10833 --- blog/edit.php | 2 +- blog/index.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/blog/edit.php b/blog/edit.php index 1e17482f2c..4927036c9e 100755 --- a/blog/edit.php +++ b/blog/edit.php @@ -9,7 +9,7 @@ $id = optional_param('id', 0, PARAM_INT); $confirm = optional_param('confirm', 0, PARAM_BOOL); $courseid = optional_param('courseid', 0, PARAM_INT); // needed for user tab - does nothing here -require_login(); +require_login($courseid); if (empty($CFG->bloglevel)) { error('Blogging is disabled!'); diff --git a/blog/index.php b/blog/index.php index 2e977f4717..f472923abc 100755 --- a/blog/index.php +++ b/blog/index.php @@ -74,7 +74,7 @@ switch ($filtertype) { } $courseid = $course->id; $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); - require_login($course->id); + require_login($course); if (!has_capability('moodle/blog:view', $coursecontext)) { error('You do not have the required permissions to view blogs in this course'); } @@ -94,7 +94,7 @@ switch ($filtertype) { } $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); $courseid = $course->id; - require_login($course->id); + require_login($course); if (!has_capability('moodle/blog:view', $coursecontext)) { error('You do not have the required permissions to view blogs in this course/group'); } @@ -131,6 +131,10 @@ switch ($filtertype) { } $userid = $filterselect; + if (!empty($courseid)) { + require_login($courseid); + } + break; default: -- 2.39.5