Skip to content

Commit

Permalink
blgos MDL-22161 Fixed unknown context bug by setting system context i…
Browse files Browse the repository at this point in the history
…s no valid course is provided in blog/edit
  • Loading branch information
Sam Hemelryk committed Apr 22, 2010
1 parent 203fda8 commit 45f2248
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blog/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
$PAGE->set_context(get_context_instance(CONTEXT_MODULE, $modid));
}

// If courseid is empty use the system context
if (empty($courseid)) {
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
}

$blogheaders = blog_get_headers();

require_login($courseid);
Expand Down

0 comments on commit 45f2248

Please sign in to comment.