Posted by digi24 on September 10, 2009 at 2:09pm
Jump to:
| Project: | User Points |
| Version: | 6.x-1.x-dev |
| Component: | Code: userpoints API |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (works as designed) |
Issue Summary
_userpoints_transaction treats the moderate parameter correctly, when txn_id is not set, but ignores it when updating an txn_id.
Somebody familiar with the module, please check, whether other variables should be altered, before joinig the array.
Index: userpoints.module
===================================================================
--- userpoints.module (revision 762)
+++ userpoints.module (working copy)
@@ -735,6 +735,13 @@
$params['changed'] = $time;
if (is_numeric($params['txn_id'])) {
+ if ($params['moderate'] == true) {
+ $params['status'] = 1;
+ }
+ else {
+ $params['status'] = 0;
+ }
+
//A transaction ID was passed in so we'll update the transaction
$result = db_query("SELECT txn_id, uid, approver_uid, points,
time_stamp, status, operation, description, reference, expirydate, expired,
Comments
#1
This is by design. moderate can only be used for new transactions, when updating existing transactions, you need to use status directly.