Posted by Jeremy on February 9, 2006 at 1:41am
| Project: | AdSense |
| Version: | 4.6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
in _adsense_choose_client() you the following logic causes revenue sharing to not work if the $percent_referral is 0:
if (!$percent_author || !$percent_referral || !$author_client) {
return $site_client;
}
Comments
#1
This is pretty critical.
#2
Brenda,
This should not affect your site, since you already have the referral percentage set to a non-zero amount.
It only affects those who do not use the User Referral module, but have revenue sharing enabled.
I will investigate this over the weekend.
#3
Oops, you're right. I tested it briefly and didn't see any ads of the other coming up, but it was just a fluke. :)
#4
Jeremy
Can you try this patch and see if it works on your site?
Thanks.
#5
This one is a bit better. Give it a shot.
#6
I'm using 4.6.
I don't know how to apply patches so I did this code change. It seems to work fine. But I guess referals won't work now ?
//Old Code
// if (!$percent_author || !$percent_referral || !$author_client) {
// return $site_client;
// }
// New Code
if (!$percent_author || !$author_client) {
return $site_client;
}
I got to learn how to apply those patches.
Marcel
#7
Attaching the full module. If it works well for you, then let me know, and I will commit it.
#8
That last patched module works for me.
Thank you ! :)
Marcel
#9
Committed for 4.6, 4.7 and HEAD.