BUG Fix comments form appearing on login page

This commit is contained in:
Damian Mooyman 2015-04-13 16:34:20 +12:00
parent 5254d72ccd
commit 69c928650a

View File

@ -230,6 +230,9 @@ class CommentsExtension extends DataExtension {
* @return boolean
*/
public function getCommentsEnabled() {
// Don't display comments form for pseudo-pages (such as the login form)
if(!$this->owner->exists()) return false;
// Determine which flag should be used to determine if this is enabled
if($this->owner->getCommentsOption('enabled_cms')) {
return $this->owner->ProvideComments;