X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=docs%2Fhooks.txt;h=7f8b19274b37204015b93c20ea927f7352e9b3a9;hb=f75b449f2d0b0b3c0f45dcfd2dee497580d10a8f;hp=1419d0a9d96fdaf5d93d2234c7b855a69f2d3b19;hpb=632a82ec8e03ea701f257b96bc092d520385c47e;p=lhc%2Fweb%2Fwiklou.git diff --git a/docs/hooks.txt b/docs/hooks.txt index 1419d0a9d9..7f8b19274b 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3568,7 +3568,10 @@ hook. If your extension absolutely, positively must prevent some files from being uploaded, use UploadVerifyFile or UploadVerifyUpload. $upload: (object) An instance of UploadBase, with all info about the upload $user: (object) An instance of User, the user uploading this file -$props: (array) File properties, as returned by FSFile::getPropsFromPath() +$props: (array|null) File properties, as returned by + MWFileProps::getPropsFromPath(). Note this is not always guaranteed to be set, + e.g. in test scenarios. Call MWFileProps::getPropsFromPath() yourself in case + you need the information. &$error: output: If the file stashing should be prevented, set this to the reason in the form of [ messagename, param1, param2, ... ] or a MessageSpecifier instance (you might want to use ApiMessage to provide machine @@ -3597,7 +3600,10 @@ MIME type (same as UploadVerifyFile) and the information entered by the user (upload comment, file page contents etc.). $upload: (object) An instance of UploadBase, with all info about the upload $user: (object) An instance of User, the user uploading this file -$props: (array) File properties, as returned by FSFile::getPropsFromPath() +$props: (array|null) File properties, as returned by + MWFileProps::getPropsFromPath(). Note this is not always guaranteed to be set, + e.g. in test scenarios. Call MWFileProps::getPropsFromPath() yourself in case + you need the information. $comment: (string) Upload log comment (also used as edit summary) $pageText: (string) File description page text (only used for new uploads) &$error: output: If the file upload should be prevented, set this to the reason