BUGFIX: avoid calling updateCMSFields 2x in Member #2851

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

sunnysideup commented Feb 16, 2014

$this->extend('updateCMSFields', $fields); 

is called in DataObject::getCMSFields, but it is also called in Member::getCMSFields. While it is important to have an extend in both, it is not so useful to call the same method twice. Therefore, we call updateMemberCMSFields in Member.

See #2827

@sunnysideup sunnysideup BUGFIX: avoid calling updateCMSFields 2x in Member
```php
$this->extend('updateCMSFields', $fields); 
```

is called in DataObject::getCMSFields, but it is also called in Member::getCMSFields.  While it is important to have an extend in both, it is not so useful to call the same method twice.  Therefore, we call  updateMemberCMSFields in Member.

See silverstripe#2827
99d7677
Contributor

simonwelsh commented Mar 3, 2014

As discussed, this isn't the way to go about this.

simonwelsh closed this Mar 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment