diff options
author | Petr Pchelko <ppchelko@wikimedia.org> | 2021-04-05 13:43:12 -0600 |
---|---|---|
committer | Petr Pchelko <ppchelko@wikimedia.org> | 2021-05-10 10:57:06 -0700 |
commit | 7b882b2e513ac4bda07564a0a6ad217d81628fc1 (patch) | |
tree | 16f8fa0f511411debdc9de6902b1d123f113c116 /includes/filerepo/file/OldLocalFile.php | |
parent | e56ca63098b037624e6fd0c04b58fe42e4eb8c1b (diff) | |
download | mediawikicore-7b882b2e513ac4bda07564a0a6ad217d81628fc1.tar.gz mediawikicore-7b882b2e513ac4bda07564a0a6ad217d81628fc1.zip |
Convert File to Authority/UserIdentity
None of the changed methods actually are overridden
according to codesearch, so I guess it is ok
to change signatures.
Change-Id: I35bafb303163dfc1584a13b29675b5e10cd055fd
Diffstat (limited to 'includes/filerepo/file/OldLocalFile.php')
-rw-r--r-- | includes/filerepo/file/OldLocalFile.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/filerepo/file/OldLocalFile.php b/includes/filerepo/file/OldLocalFile.php index f19af9fbed83..04e10e518cdc 100644 --- a/includes/filerepo/file/OldLocalFile.php +++ b/includes/filerepo/file/OldLocalFile.php @@ -22,7 +22,9 @@ */ use MediaWiki\MediaWikiServices; +use MediaWiki\Permissions\Authority; use MediaWiki\Revision\RevisionRecord; +use MediaWiki\User\UserIdentity; /** * Class to represent a file in the oldimage table @@ -392,16 +394,16 @@ class OldLocalFile extends LocalFile { * field of this image file, if it's marked as deleted. * * @param int $field - * @param User $user User object to check + * @param Authority $performer User object to check * @return bool */ - public function userCan( $field, User $user ) { + public function userCan( $field, Authority $performer ) { $this->load(); return RevisionRecord::userCanBitfield( $this->deleted, $field, - $user + $performer ); } @@ -440,7 +442,7 @@ class OldLocalFile extends LocalFile { * @param string $archiveName The archive name of the file * @param string $timestamp * @param string $comment Upload comment - * @param User $user User who did this upload + * @param UserIdentity $user User who did this upload * @return bool */ protected function recordOldUpload( $srcPath, $archiveName, $timestamp, $comment, $user ) { |