Merge pull request #106 from tractorcow/pulls/2.0/fix-login-options

BUG Fix comments form appearing on login page
This commit is contained in:
Christopher Pitt 2015-04-13 18:48:59 +12:00
commit 128fa67f65

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;