Standardised file description headers:
[lhc/web/wiklou.git] / docs / hooks.txt
index d414145..bbc1bed 100644 (file)
@@ -788,6 +788,8 @@ $reason: reason
 
 'FileUpload': When a file upload occurs
 $file : Image object representing the file that was uploaded
+$reupload : Boolean indicating if there was a previously another image there or not (since 1.17)
+$hasDescription : Boolean indicating that there was already a description page and a new one from the comment wasn't created (since 1.17)
 
 'FileUndeleteComplete': When a file is undeleted
 $title: title object to the file
@@ -1564,6 +1566,7 @@ SpecialRecentChanges and SpecialRecentChangesLinked
 &$join_conds: join conditions for the tables
 $opts: FormOptions for this request
 &$query_options: array of options for the database request
+&$select: String '*' or array of columns to select
 
 'SpecialSearchGomatch': called when user clicked the "Go" button and the target
 exists
@@ -1671,7 +1674,8 @@ $descriptor: (array) the HTMLForm descriptor
 added to the descriptor
 $descriptor: (array) the HTMLForm descriptor
 
-'UploadVerification': additional chances to reject an uploaded file
+'UploadVerification': additional chances to reject an uploaded file. Consider 
+                      using UploadVerifyFile instead.
 string $saveName: destination file name
 string $tempName: filesystem path to the temporary file for checks
 string &$error: output: message key for message to show if upload canceled 
@@ -1679,6 +1683,16 @@ string &$error: output: message key for message to show if upload canceled
        is the message key and the remaining elements are used as parameters to
        the message.
 
+'UploadVerifyFile': extra file verification, based on mime type, etc. Preferred
+                    in most cases over UploadVerification.
+object $upload: an instance of UploadBase, with all info about the upload
+string $mime: the uploaded file's mime type, as detected by MediaWiki. Handlers 
+       will typically only apply for specific mime types.
+object &$error: output: true if the file is valid. Otherwise, an indexed array
+       representing the problem with the file, where the first element
+       is the message key and the remaining elements are used as parameters to
+       the message.
+
 'UploadComplete': Upon completion of a file upload
 $uploadBase: UploadBase (or subclass) object. File can be accessed by
        $uploadBase->getLocalFile().