There's a lot of redundant code in field handlers that could be simplified by using a base class. I based the idea off some dated code over in #943140: Support migration into phone fields but used it to simplify the value, user and node reference handlers.

Comments

mikeryan’s picture

Status: Needs review » Fixed

Fixed a missing $field_info parameter to prepare(), committed to D7 and backported to D6 as well. Thanks!

drewish’s picture

StatusFileSize
new6.04 KB

Ah, yeah looks like I'd fixed some bugs in that but forgot to push out a new patch. Here's my fixed one.

drewish’s picture

Mike, any reason you don't like the @code syntax used by core?

drewish’s picture

Status: Fixed » Needs review
StatusFileSize
new1.57 KB

Here's a patch with the corrected docs.

mikeryan’s picture

Nothing personal against @code, just don't usually think of it...

Committed to D6 and D7, thanks!

drewish’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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