I wanted to add some functionality so that a flag is created on each file download, including the Download all link field. In order to do this, I needed to add a hook to download.module. Patch is attached.

In my case, I had a mymodule_download_download() call that called a rule with rules_invoke_event(). If you think it would be worthwhile to set up a rules action, I would be happy to update the patch to include the necessary logic.

CommentFileSizeAuthor
download-hook_download_download.patch457 bytesjlyon

Comments

30equals’s picture

Yeah, please post a patch with the necessary rules implementation, it could be a valid usecase. But i understand that you didn't use the hook_rules_event_info() etc..? Maybe put that in a download.rules.inc or something ? But whatever, i'm happy to see any patch you provide, so i can look at the logic implementation ;) Thanx!

30equals’s picture

Status: Needs review » Fixed

This addition of the hook has been fixed in the latest dev version.

Status: Fixed » Closed (fixed)

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