subscriptions updating process only handles first result from queries

peterbarnett - November 3, 2009 - 16:15
Project:Simplenews Roles
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi joachim,

As discussed, I discovered a small bug in the simplenews_roles_update_subscriptions() function, where the way the database query result is being processed means that only one row can ever be retrieved per call of the function. The effect being that only one subscription will be updated every cron run.

I've attached a patch which seems to solve the problem,

Cheers,
Peter

AttachmentSize
simplenews_roles-update.patch1.18 KB

#1

peterbarnett - November 3, 2009 - 16:17
Assigned to:peterbarnett» Anonymous

#2

joachim - November 6, 2009 - 13:12
Title:update subscriptions process» subscriptions updating process only handles first result from queries
Status:patch (to be ported)» fixed

Thanks for spotting this one, and thank you for the patch!
Total fail on my part, I always misread db_result() as giving me the whole result set as an array.

As I said when we met, any other bugs you find or improvements you want to suggest for this module, please file issues :)

Committed to CVS:
#622104 by peterbarnett: Fixed bug with subs updating queries only taking first result.

#3

System Message - November 20, 2009 - 13:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.