Not working with >= 4.6
jo1ene - September 13, 2005 - 16:56
| Project: | Affiliate |
| Version: | HEAD |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | jo1ene |
| Status: | closed |
Description
The was a sql query that was crashing this module for 4.6 installations. I played around with it and have it working like a charm for my 4.6.3 setup. The one line in error is commented with //jo1ene.
| Attachment | Size |
|---|---|
| affiliate-sql.patch | 20.28 KB |

#1
Many thanks... but next time try to create your diff with the -n switch, otherwise changes on spacing will cause diff to report that all lines have changed (as in your patch).
#2
Sorry... I mean the -w switch.
#3
I do not believe the previous patch is correct. The line that jo1ene changed now reads:
$sql = 'SELECT uid, u.name, u.status, u.changed FROM {users} u INNER JOIN {affiliates} a ON u.affiliate = a.aid WHERE affiliate = aid';This will only select users whose affiliate field is "aid" which of course none are because affiliate ids are numbers. In fact, I'm surprised this does not give an SQL syntax error.
My patch is attached (in diff -u format). It replaces use of the Drupal 4.5 check_query() function with a Drupal 4.6 query argument. It seems to work, though I've only just started using this module.
Thanks,
Barry
#4
I have taken over the Affiliate module and updated it to work with 4.7.