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.

AttachmentSize
affiliate-sql.patch20.28 KB

#1

flaviovs - October 25, 2005 - 20:06

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

flaviovs - October 26, 2005 - 11:08

Sorry... I mean the -w switch.

#3

bjaspan - April 8, 2006 - 14:10

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

AttachmentSize
aff-diff.txt 1.06 KB

#4

bjaspan - June 6, 2006 - 14:18
Status:needs review» closed

I have taken over the Affiliate module and updated it to work with 4.7.

 
 

Drupal is a registered trademark of Dries Buytaert.