wiki.techinc.nl/includes/Hook/PageMoveCompletingHook.php
DannyS712 47d70dbfba 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
2021-06-24 00:32:39 +00:00

35 lines
1.1 KiB
PHP

<?php
namespace MediaWiki\Hook;
use MediaWiki\Linker\LinkTarget;
use MediaWiki\Revision\RevisionRecord;
use MediaWiki\User\UserIdentity;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "PageMoveCompleting" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface PageMoveCompletingHook {
/**
* This hook is called after moving an article (title), pre-commit
*
* @since 1.35
*
* @param LinkTarget $old Old title
* @param LinkTarget $new New title
* @param UserIdentity $user User who did the move
* @param int $pageid Database ID of the page that's been moved
* @param int $redirid Database ID of the created redirect
* @param string $reason Reason for the move
* @param RevisionRecord $revision RevisionRecord created by the move
* @return bool|void True or no return value to continue or false stop other hook handlers,
* doesn't abort the move itself
*/
public function onPageMoveCompleting( $old, $new, $user, $pageid, $redirid,
$reason, $revision
);
}