Commit 9f1f5f48 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add public_feedback_allowed() function to artefacts

parent 79156d7e
......@@ -358,6 +358,10 @@ class ArtefactTypeBlog extends ArtefactType {
$artefact->set('commentsnotify', $values['commentsnotify'] ? true : false);
$artefact->commit();
}
public function public_feedback_allowed() {
return $this->get('commentsallowed');
}
}
/**
......@@ -755,6 +759,9 @@ class ArtefactTypeBlogPost extends ArtefactType {
WHERE f.blogpost = ' . $this->id, '');
}
public function public_feedback_allowed() {
return parent::get('commentsallowed');
}
}
......
......@@ -510,6 +510,17 @@ abstract class ArtefactType {
throw new Exception('This artefact cannot render to this format.');
}
/**
* By default public feedback can be placed on all artefacts.
* Artefact types which don't want to allow public feedback should
* redefine this function.
*/
public function public_feedback_allowed() {
return true;
}
/**
* returns path to icon
* can be called statically but not defined so
......
Supports Markdown
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