mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merged fix from 1.6 for bug:
Notice: Undefined property: id in /home/moodle/public_html/certificate/mod/forum/discuss.php on line 38 This happens when the user is not logged in and wants to view a forum of type news.
This commit is contained in:
parent
05b7eba955
commit
883f4e3dc6
@ -35,7 +35,7 @@
|
||||
} elseif ($forum->type == "news") {
|
||||
if (!((isadmin() and !empty($CFG->admineditalways))
|
||||
|| isteacher($course->id)
|
||||
|| $USER->id == $discussion->userid
|
||||
|| (!empty($USER->id) && $USER->id == $discussion->userid)
|
||||
|| (($discussion->timestart == 0 || $discussion->timestart <= time())
|
||||
&& ($discussion->timeend == 0 || $discussion->timeend > time())))) {
|
||||
error('Discussion ID was incorrect or no longer exists', "$CFG->wwwroot/mod/forum/view.php?f=$forum->id");
|
||||
|
Loading…
x
Reference in New Issue
Block a user