diff options
author | DannyS712 <dannys712.wiki@gmail.com> | 2021-05-02 23:55:07 +0000 |
---|---|---|
committer | DannyS712 <dannys712.wiki@gmail.com> | 2021-06-24 00:32:39 +0000 |
commit | 47d70dbfbae83827169bf39a21c8d32541dd94e6 (patch) | |
tree | 48c08d0cc2867949c5f7c5b4b8a2d4eeeaf6edb5 /includes/DummyLinker.php | |
parent | f009c79eb7ca68d75a431372aadafede357d3845 (diff) | |
download | mediawikicore-47d70dbfbae83827169bf39a21c8d32541dd94e6.tar.gz mediawikicore-47d70dbfbae83827169bf39a21c8d32541dd94e6.zip |
Post Revision-removal cleanup
Updates for the removal of the Revision class itself
and the various methods/hooks/variables removed in the
process, including:
- Update some documentation removing most references
to the Revision class and updating the MCR migration
notes to reflect the past tense for Revision methods.
- Change some capitalization from "Revision" to "revision"
to make it clear comments are about revisions in general,
not the Revision class in particular.
- Minor code tweaks including removing unused variables that
were around for the old hooks that were removed, and
removing the use of DeprecatablePropertyArray where no
longer needed for anything.
- Fix incorrect documentation for PageUpdater::getStatus(),
the status value changed a while ago to have revision-record
in addition to revision, and recently to only have the
revision-record, but ironically PageUpdater was never updated.
- Removed Parser::$mRevisionObject, used to be a Revision object
and was deprecated in 1.35, missed earlier because it was no
longer being set to Revision objects, always null.
- Add RevisionRecord typehints in DummyLinker to match those
in the corresponding Linker methods
This should be a no-op in terms of functionality.
Bug: T247143
Change-Id: I03bbb94fc29085855448780b1a5ad9063911ecc4
Diffstat (limited to 'includes/DummyLinker.php')
-rw-r--r-- | includes/DummyLinker.php | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/includes/DummyLinker.php b/includes/DummyLinker.php index 70cbd1769d96..04d4aa71a985 100644 --- a/includes/DummyLinker.php +++ b/includes/DummyLinker.php @@ -1,6 +1,7 @@ <?php use MediaWiki\MediaWikiServices; +use MediaWiki\Revision\RevisionRecord; /** * @since 1.18 @@ -246,12 +247,12 @@ class DummyLinker { return Linker::emailLink( $userId, $userText ); } - public function revUserLink( $rev, $isPublic = false ) { - return Linker::revUserLink( $rev, $isPublic ); + public function revUserLink( RevisionRecord $revRecord, $isPublic = false ) { + return Linker::revUserLink( $revRecord, $isPublic ); } - public function revUserTools( $rev, $isPublic = false ) { - return Linker::revUserTools( $rev, $isPublic ); + public function revUserTools( RevisionRecord $revRecord, $isPublic = false ) { + return Linker::revUserTools( $revRecord, $isPublic ); } public function formatComment( @@ -318,8 +319,8 @@ class DummyLinker { ); } - public function revComment( $rev, $local = false, $isPublic = false ) { - return Linker::revComment( $rev, $local, $isPublic ); + public function revComment( RevisionRecord $revRecord, $local = false, $isPublic = false ) { + return Linker::revComment( $revRecord, $local, $isPublic ); } public function formatRevisionSize( $size ) { @@ -379,28 +380,28 @@ class DummyLinker { } public function generateRollback( - $rev, + RevisionRecord $revRecord, IContextSource $context = null, $options = [ 'verify' ] ) { return Linker::generateRollback( - $rev, + $revRecord, $context, $options ); } - public function getRollbackEditCount( $rev, $verify ) { - return Linker::getRollbackEditCount( $rev, $verify ); + public function getRollbackEditCount( RevisionRecord $revRecord, $verify ) { + return Linker::getRollbackEditCount( $revRecord, $verify ); } public function buildRollbackLink( - $rev, + RevisionRecord $revRecord, IContextSource $context = null, $editCount = false ) { return Linker::buildRollbackLink( - $rev, + $revRecord, $context, $editCount ); @@ -422,10 +423,10 @@ class DummyLinker { return Linker::accesskey( $name ); } - public function getRevDeleteLink( User $user, $rev, Title $title ) { + public function getRevDeleteLink( User $user, RevisionRecord $revRecord, Title $title ) { return Linker::getRevDeleteLink( $user, - $rev, + $revRecord, $title ); } |