Both userpoints_userpointsapi() and _userpoints_transaction() set status based on the moderate flag.

That was never necessary and now it's a bad idea because $params is passed to the hooks by reference which allows them to change status in the points before hook but it's overriden again after that.

Patch also makes sure that the constants are used instead of 0/1/2. Makes the code a lot easier to read especially since it's kinda backwards to use 0 for approved :)

Comments

BenK’s picture

Keeping track of this thread...

BenK’s picture

Status: Needs review » Reviewed & tested by the community

A difficult patch to manually test, but I applied it and noticed no ill effects.

--Ben

berdir’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Commited to 7.x-1.x-dev, will provide a backport for 6.x later.

berdir’s picture

Status: Patch (to be ported) » Needs review
Issue tags: +userpoints backport

Attaching an updated patch for D6.

berdir’s picture

StatusFileSize
new2.39 KB

erm. Now with patch.

berdir’s picture

Status: Needs review » Fixed

Commited.

Status: Fixed » Closed (fixed)
Issue tags: -userpoints backport

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