Commit 066fe799 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1818591: Fix undefined index versioning error"

parents 050e43ba 96feeef9
......@@ -1083,6 +1083,9 @@ class ArtefactTypeBlogPost extends ArtefactType {
require_once(get_config('docroot') . 'lib/view.php');
$view = new View($viewoptions['viewid']);
$artefact = artefact_instance_from_id($post->id);
if (!isset ($viewoptions['versioning'])) {
$viewoptions['versioning'] = false;
}
list($commentcount, $comments) = ArtefactTypeComment::get_artefact_comments_for_view($artefact, $view, null, false, false, $viewoptions['versioning']);
$post->commentcount = $commentcount;
$post->comments = $comments;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment