Closed (fixed)
Project:
Web File Manager Statistics
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jan 2012 at 12:54 UTC
Updated:
12 Sep 2012 at 09:27 UTC
I'm currently using webfm 6.x-2.16 and webfm_statistics 6.x-1.1 on a test server.
I noticed that downloads via webfm were not being recorded in the webfm statistics table. In fact it seemed at no point during the download that the hook webfm_statistics_webfm_send() was being invoked.
After a bit of fiddling I added the hook invocation
module_invoke_all('webfm_send', $file);
To the count download code lines in function webfm_file_download() in webfm.module.
This seems to work nicely but is it the right thing to do? I am happy to submit a patch file if required.
Thanks,
Rob.
Comments
Comment #1
nhck commentedThe hook isn't really necessary anymore since webfm now actually uses hook_file_download (http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hoo...)
So in webfm_statistics one could implement something like:
Comment #2
nhck commentedI am just gonna move this over so Jeff can have a look
Comment #3
scialo commentedI solved by implementing the code below:
Comment #5
francis55 commentedI was having 0 rows of output in the Webfm statistics table, despite downloading files . I tried pasting the code above (in#3) into the
webfm_statistics.modulefile , and it started working!I'm using version 6.x-1.1.
Maybe the code could be added to the module?