Skip to content

Commit

Permalink
adding redirect for blog feeds #711188
Browse files Browse the repository at this point in the history
  • Loading branch information
Will.Wise authored and sammarshallou committed Dec 7, 2023
1 parent 6f75c48 commit 23d4007
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@
$blog = $DB->get_record('oublog', array('id'=>$bloginstance->oublogid));
}
if (!isset($blog->id) || !$cm = get_coursemodule_from_instance('oublog', $blog->id)) {
throw new moodle_exception('invalidcoursemodule');
if (file_exists($CFG->dirroot . '/local/error/http-error.php')) {
redirect(new moodle_url('/local/error/http-error.php', ['test' => '404']));
} else {
throw new moodle_exception('invalidcoursemodule');
}
}
// Get child blog.
if (!empty($childblogid)) {
Expand Down

0 comments on commit 23d4007

Please sign in to comment.