From b40bfd30c5a6e1af2f9814438e16873e1fc1598d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 26 Jan 2016 18:03:56 +0100 Subject: [PATCH] Document how LocalFile::upload() and UploadBase::performUpload() ignore user permissions Follow-up to 61c7852049de45664593437f8b8335809fdbccae. Change-Id: I6e69b1fa12f336dc4dd12e845cb8bf42abd599b2 --- includes/filerepo/file/LocalFile.php | 1 + includes/upload/UploadBase.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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() ) { -- 2.20.1