Hi,

Field array does not contain the field's machine name while it would be usefull to factorize similar callbacks.
The tiny attached patch is a non regressive way to achieve this.

I hope this will help.
Regards

Comments

duaelfr’s picture

Status: Active » Needs review
swentel’s picture

Status: Needs review » Needs work

Maybe, it's better to just put it in the $field variable as a new key, like $field['field_name'] = $key; That way, I can easily backport this as well and it will be available for every DS field type.

duaelfr’s picture

Status: Needs work » Needs review
StatusFileSize
new447 bytes

Using less parameters than asked by the function's prototype would not cause regressions but you are rthe boss (and you are right) so there is a new patch :)

swentel’s picture

Status: Needs review » Fixed

Hmm, you're right, extra paramaters wouldn't hurt at all, but this way all functions get the extra field name. Committed and pushed to both branches, welcome to the committers list! :)

duaelfr’s picture

What a commit ! ;)
Thank you for your reactivity.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

minor change