Manual:Hooks/ImgAuthBeforeStream

Details
If the hook returns true, it will go ahead and stream the file. If not, it will display the indexed messages returned in  and.


 * : the Title object of the file as it would appear for the upload page
 * : the original file and path name when  was invoked by the the web server
 * : the name only component of the file
 * : The location to pass back results of the hook routine (only used if failed)
 * : The index of the header message
 * : The index of the body text message
 * : Parameters passed to body text message. Please note the header message cannot receive/use parameters.

IMPORTANT: Parameters , and   are message indices, NOT actual messages. They will be resolved and localized using wfMsgHTML($msgIndex). Parameters are only be passed to the body text message. For help in defining and using messages, see: System Messages

Example
This example hook routinely checks to see if the file was stored in Namespace mode, and if so, modifies the Title to include the namespace. If the title is now invalid, returns indexes to the header and body text of the user messages as well as the name of the file as a parameter which is passed used by the body text.