In the process of looking at the functionality offered by file.inc I realized that it needed some documentation improvements. No code should be affected by this patch.

Comments

walkah’s picture

+1 .. file.inc can always use better documentation. With the caveat that I intend to change some of this in the near future... but this wouldn't hurt.

one nitpick - file_download calls hook_download not strictly for permission checking, the hook_download implementations should also return any content-type, etc. headers for the downloads.

drewish’s picture

StatusFileSize
new5.95 KB

good point about the downloads. i've updated that part of the patch to be a bit more precise.

drewish’s picture

StatusFileSize
new6.91 KB

Fixed a typo (hook_download() -> hook_file_download()) and added some more comments.

drewish’s picture

Version: 4.7.0-beta4 » x.y.z
drewish’s picture

Version: x.y.z » 4.7.0-beta5
StatusFileSize
new6.88 KB

here's a re-roll for head. i'd really like to get this in by the time the new drupaldocs server comes up.

killes@www.drop.org’s picture

Status: Needs review » Fixed

applied. there were some minor formatting issues which I fixed manually

Anonymous’s picture

Status: Fixed » Closed (fixed)