Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix history comparison fields #1749

Merged
merged 2 commits into from
Feb 28, 2017

Conversation

flamerohr
Copy link
Contributor

so the fields no longer escape the <ins> and <del> tags injected by the Differencer in the History view for pages.

Original issue #1746

Also added some unit tests for this.

@flamerohr flamerohr modified the milestone: CMS 4.0.0-beta1 Feb 28, 2017

public function transformReadonly(FieldList $fields)
{
foreach($fields as &$field) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with iterating over FieldList directly is that it only loops over the top level of fields.

Try foreach ($fields->dataFields() as $field) {, which has the added benefit of selecting only data fields, so you don't need the CompositeField filter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing it :)

@tractorcow tractorcow merged commit 20f6ec4 into silverstripe:master Feb 28, 2017
@tractorcow tractorcow deleted the pulls/4.0/show-diff branch February 28, 2017 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants