Closed (works as designed)
Project:
Download Count
Version:
6.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2010 at 01:11 UTC
Updated:
3 Nov 2011 at 20:38 UTC
Jump to comment: Most recent file
Comments
Comment #1
iva2k commentedOne more issue worth addressing in bulk:
3). hook_file_download() may be used to only check for file access permissions. Download count increments the counter incorrectly for such calls.
Updated patch covering all 3 issues is included.
Comment #2
WorldFallz commentedComment #3
WorldFallz commentedstrtolower fix committed-- thanks. Still trying to understand the other fix.
Comment #4
iva2k commentedI guess you meant fix 3) in #1...
Anyway, more explanations:
2) is straightforward - _download_count_stats() split does not change existing functionality. It just makes the download counter available to other modules in more universal way. It may be better with a new hook, but that may require some core improvements. See issue #588106: Duplicate listing of files when also using download_count.module.
3) is very specific to what itweak_upload is trying to do, but also applicable to other scenarios. ITU needs the info about the file without downloading it (checks file type). There is no API call to do it in drupal, only hook_file_download() which returns the needed information. The problem is that hook_file_download() assumes the file will be downloaded. My patch adds a second optional argument that tells it is just an info check. Otherwise download_count increments every time the page with the file is served and itweak_upload is used.
Hope that clarifies the purpose.
Comment #5
iva2k commentedI'd like to know if the remaining 2 fixes can be committed to 1.x-dev and also rolled over to 2.x-dev. Module interoperability is at stake.
Comment #6
WorldFallz commentedsorry I've slow with this module-- but yes, your patches look good. Interoperability is always a good thing. I'm just finishing up a filter for the views integration, then testing these will be next. Assuming no bugs i have no problem committing them.
Thanks for the patches!
Comment #7
WorldFallz commentedsomehow this didn't make it into 1.x-- just committed the strtolower and checkonly changes.
Sorry, but I'm not sure how the other change fixes compat with iTweak upload. I'm not trying to be difficult, but i'm not a professional developer and I need to understand any code changes I commit. Can you explain what the problem is?
Comment #8
WorldFallz commentedalso committed the checkonly option to 6.x-2.x branch (already had the strtolower fix).
Comment #9
WorldFallz commentedComment #10
WorldFallz commentedno response in a almost a year, and d6/core upload module is a dead end. Reopen if you want to pursue the outstanding items.