Would be nice to have hook_subscriptions_write

gengel - July 23, 2009 - 23:20
Project:Subscriptions
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:minor
Assigned:Unassigned
Status:needs work
Description

For modules that want to be notified when a user has subscribed to something. Failing that, a trigger.

Obviously not a major concern, though ;)

#1

salvis - July 24, 2009 - 22:37

Yes, please supply a patch.

#2

gengel - July 26, 2009 - 20:56

Okay!

Mostly, this just adds a module_invoke_all before writing to the database. The one major change was adding a subscription_delete_subscription and replacing manual SQL DELETEs with calls to this, so that all subscription deletes may also invoke the hook.

AttachmentSize
subscriptions.admin_.inc_.patch 948 bytes
subscriptions.module.patch 3.42 KB
subscriptions_content.module.patch 1.13 KB
subscriptions_taxonomy.module.patch 715 bytes
subscriptions_ui.module.patch 784 bytes

#3

gengel - July 26, 2009 - 20:57
Status:active» needs review

#4

gengel - August 20, 2009 - 06:58

What are the odds of this patch being accepted?

#5

salvis - August 21, 2009 - 07:21

I'll get back to you this weekend, promise.

(Having a single unified patch rather than five separate ones would certainly make the reviewers life easier...)

#6

salvis - August 21, 2009 - 07:27
Status:needs review» needs work

Yes, now that I think about it, it's much less work for you to create a unified patch than it is for me to apply five separate patches. So please do that (and take the current -dev, of course).

 
 

Drupal is a registered trademark of Dries Buytaert.