Document how LocalFile::upload() and UploadBase::performUpload() ignore user permissions
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 26 Jan 2016 17:03:56 +0000 (18:03 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 26 Jan 2016 17:03:56 +0000 (18:03 +0100)
Follow-up to 61c7852049de45664593437f8b8335809fdbccae.

Change-Id: I6e69b1fa12f336dc4dd12e845cb8bf42abd599b2

includes/filerepo/file/LocalFile.php
includes/upload/UploadBase.php

index 82d6a76..6d8f0b8 100644 (file)
@@ -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.
         */
index ad26f7d..4294408 100644 (file)
@@ -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() ) {