Commit 561fb82f authored by Aaron Wells's avatar Aaron Wells
Browse files

Fix ArtefactTypeMismatchException when putting a profile icon in an image block

Bug 1419539

Change-Id: Id0ce0e028a504b5284e13a2f01e71e7ca1f07c1d
parent 05efeba4
......@@ -49,12 +49,11 @@ class PluginBlocktypeImage extends PluginBlocktype {
if (!empty($configdata['width'])) {
$src .= '&maxwidth=' . $configdata['width'];
}
$artefact = new ArtefactTypeImage($id);
require_once(get_config('docroot') . 'artefact/comment/lib.php');
require_once(get_config('docroot') . 'lib/view.php');
$view = new View($viewid);
list($commentcount, $comments) = ArtefactTypeComment::get_artefact_comments_for_view($artefact, $view, $instance->get('id'), true, $editing);
list($commentcount, $comments) = ArtefactTypeComment::get_artefact_comments_for_view($image, $view, $instance->get('id'), true, $editing);
$smarty = smarty_core();
$smarty->assign('commentcount', $commentcount);
$smarty->assign('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