The _flag() method should be changed to work with an actual $flagging record, since one is available when it's called.

Note that _flag() is labelled as private -- no other modules should be calling it, even in the case of subclasses of flag.

Comments

joachim’s picture

Status: Active » Needs review
StatusFileSize
new1.91 KB
joachim’s picture

Tests pass, but I'd appreciate a review by a human as well, given this provides critical functionality.

socketwench’s picture

Status: Needs review » Reviewed & tested by the community

Works for me. Tests clean too.

joachim’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the review.

I've committed #2203047: FlagLinkTypeConfirmTestCase doesn't check a flagging happened, which adds checking of the flagging entity to the confirm link test -- this is the other place outside of the flag class which calls new_flagging(), which is altered by this patch.

This also goes some way towards fixing #2196055: entity hooks don't get passed a proper Flagging entity -- and in fact may do so entirely.

joachim’s picture

Status: Fixed » Closed (fixed)

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