From: Bartosz DziewoƄski Date: Tue, 26 Jan 2016 17:03:56 +0000 (+0100) Subject: Document how LocalFile::upload() and UploadBase::performUpload() ignore user permissions X-Git-Tag: 1.31.0-rc.0~8200^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=b40bfd30c5a6e1af2f9814438e16873e1fc1598d;p=lhc%2Fweb%2Fwiklou.git Document how LocalFile::upload() and UploadBase::performUpload() ignore user permissions Follow-up to 61c7852049de45664593437f8b8335809fdbccae. Change-Id: I6e69b1fa12f336dc4dd12e845cb8bf42abd599b2 --- diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 82d6a769ea..6d8f0b8f61 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1120,6 +1120,7 @@ class LocalFile extends File { * current time * @param User|null $user User object or null to use $wgUser * @param string[] $tags Change tags to add to the log entry and page revision. + * (This doesn't check $user's permissions.) * @return FileRepoStatus On success, the value member contains the * archive name, or an empty string if it was a new file. */ diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index ad26f7d0ce..4294408720 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -690,9 +690,11 @@ abstract class UploadBase { * * @param string $comment * @param string $pageText - * @param bool $watch + * @param bool $watch Whether the file page should be added to user's watchlist. + * (This doesn't check $user's permissions.) * @param User $user * @param string[] $tags Change tags to add to the log entry and page revision. + * (This doesn't check $user's permissions.) * @return Status Indicating the whether the upload succeeded. */ public function performUpload( $comment, $pageText, $watch, $user, $tags = array() ) {