mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
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:
commit
128fa67f65
@ -230,6 +230,9 @@ class CommentsExtension extends DataExtension {
|
|||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function getCommentsEnabled() {
|
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
|
// Determine which flag should be used to determine if this is enabled
|
||||||
if($this->owner->getCommentsOption('enabled_cms')) {
|
if($this->owner->getCommentsOption('enabled_cms')) {
|
||||||
return $this->owner->ProvideComments;
|
return $this->owner->ProvideComments;
|
||||||
|
Loading…
Reference in New Issue
Block a user