Merge "Remove UndeleteForm::undelete hook"

This commit is contained in:
jenkins-bot 2021-10-01 00:57:48 +00:00 committed by Gerrit Code Review
commit c17eaaa54c
6 changed files with 1 additions and 42 deletions

View file

@ -120,6 +120,7 @@ because of Phabricator reports.
* If you want to use interwiki titles with HTMLTitleTextField, you now need
to pass 'interwiki' => true. In 1.37, the default behavior was to let
interwiki title through by default, logging a deprecation warning.
* The `UndeleteForm::undelete` hook, deprecated in 1.37, was removed.
* Several Skin methods, hard deprecated in 1.36, have been removed. These
include Skin::privacyLink(), aboutLink(), disclaimerLink(), makeUrl()
getIndicatorsHTML(), getLogo(), subPageSubtitle(), getSearchLink(),

View file

@ -1043,7 +1043,6 @@ $wgAutoloadLocalClasses = [
'MediaWiki\\Hook\\UnblockUserHook' => __DIR__ . '/includes/specials/Hook/UnblockUserHook.php',
'MediaWiki\\Hook\\UndeleteForm__showHistoryHook' => __DIR__ . '/includes/specials/Hook/UndeleteForm__showHistoryHook.php',
'MediaWiki\\Hook\\UndeleteForm__showRevisionHook' => __DIR__ . '/includes/specials/Hook/UndeleteForm__showRevisionHook.php',
'MediaWiki\\Hook\\UndeleteForm__undeleteHook' => __DIR__ . '/includes/specials/Hook/UndeleteForm__undeleteHook.php',
'MediaWiki\\Hook\\UndeletePageToolLinksHook' => __DIR__ . '/includes/skins/Hook/UndeletePageToolLinksHook.php',
'MediaWiki\\Hook\\UnwatchArticleCompleteHook' => __DIR__ . '/includes/actions/Hook/UnwatchArticleCompleteHook.php',
'MediaWiki\\Hook\\UnwatchArticleHook' => __DIR__ . '/includes/actions/Hook/UnwatchArticleHook.php',

View file

@ -58,7 +58,6 @@ class DeprecatedHooks {
'UserSaveOptions' => [ 'deprecatedVersion' => '1.37' ],
'UserSetCookies' => [ 'deprecatedVersion' => '1.27' ],
'WikiPageDeletionUpdates' => [ 'deprecatedVersion' => '1.32', 'silent' => true ],
'UndeleteForm::undelete' => [ 'deprecatedVersion' => '1.37' ],
'userCan' => [ 'deprecatedVersion' => '1.37' ],
'ArticleDelete' => [ 'deprecatedVersion' => '1.37', 'silent' => true ],
'ArticleDeleteComplete' => [ 'deprecatedVersion' => '1.37', 'silent' => true ],

View file

@ -374,7 +374,6 @@ class HookRunner implements
\MediaWiki\Hook\UnblockUserHook,
\MediaWiki\Hook\UndeleteForm__showHistoryHook,
\MediaWiki\Hook\UndeleteForm__showRevisionHook,
\MediaWiki\Hook\UndeleteForm__undeleteHook,
\MediaWiki\Hook\UndeletePageToolLinksHook,
\MediaWiki\Hook\UnitTestsAfterDatabaseSetupHook,
\MediaWiki\Hook\UnitTestsBeforeDatabaseTeardownHook,
@ -3899,13 +3898,6 @@ class HookRunner implements
);
}
public function onUndeleteForm__undelete( &$archive, $title ) {
return $this->container->run(
'UndeleteForm::undelete',
[ &$archive, $title ]
);
}
public function onUndeletePageToolLinks( IContextSource $context, LinkRenderer $linkRenderer, array &$links ) {
return $this->container->run(
'UndeletePageToolLinks',

View file

@ -1,31 +0,0 @@
<?php
namespace MediaWiki\Hook;
use PageArchive;
use Title;
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "UndeleteForm::undelete" to register handlers implementing this interface.
*
* @deprecated since 1.37
* @ingroup Hooks
*/
interface UndeleteForm__undeleteHook {
/**
* This hook is called in UndeleteForm::undelete, after checks are conducted.
*
* Called after checking that the site is not in read-only mode, that the Title object is
* not null and after a PageArchive object has been constructed but before performing any
* further processing.
*
* @since 1.35
*
* @param PageArchive &$archive
* @param Title $title The title of the page that we're about to undelete
* @return bool|void True or no return value to continue or false to abort
*/
public function onUndeleteForm__undelete( &$archive, $title );
}

View file

@ -1351,7 +1351,6 @@ class SpecialUndelete extends SpecialPage {
$out = $this->getOutput();
$archive = new PageArchive( $this->mTargetObj );
$this->getHookRunner()->onUndeleteForm__undelete( $archive, $this->mTargetObj );
$ok = $archive->undeleteAsUser(
$this->mTargetTimestamp,
$this->getUser(),