Remove deprecated SkinTemplateNavigation hooks
- SkinTemplateNavigation hook - SkinTemplateNavigation::SpecialPage hook Bug: T339969 Change-Id: I0aa4a593ae5c795ca2f75234f379e5ad0efa48aa
This commit is contained in:
parent
bcd6c5eaac
commit
b6becee5eb
7 changed files with 2 additions and 96 deletions
|
|
@ -210,6 +210,8 @@ because of Phabricator reports.
|
||||||
deprecation.
|
deprecation.
|
||||||
* SelectQueryBuilder::lockForUpdate(), deprecated in 1.40 and unused,
|
* SelectQueryBuilder::lockForUpdate(), deprecated in 1.40 and unused,
|
||||||
has been removed without hard deprecation.
|
has been removed without hard deprecation.
|
||||||
|
* SkinTemplateNavigation and SkinTemplateNavigation::SpecialPage hooks,
|
||||||
|
deprecated in 1.39, have been removed.
|
||||||
* …
|
* …
|
||||||
|
|
||||||
=== Deprecations in 1.41 ===
|
=== Deprecations in 1.41 ===
|
||||||
|
|
|
||||||
|
|
@ -1353,8 +1353,6 @@ $wgAutoloadLocalClasses = [
|
||||||
'MediaWiki\\Hook\\SkinPreloadExistenceHook' => __DIR__ . '/includes/skins/Hook/SkinPreloadExistenceHook.php',
|
'MediaWiki\\Hook\\SkinPreloadExistenceHook' => __DIR__ . '/includes/skins/Hook/SkinPreloadExistenceHook.php',
|
||||||
'MediaWiki\\Hook\\SkinSubPageSubtitleHook' => __DIR__ . '/includes/skins/Hook/SkinSubPageSubtitleHook.php',
|
'MediaWiki\\Hook\\SkinSubPageSubtitleHook' => __DIR__ . '/includes/skins/Hook/SkinSubPageSubtitleHook.php',
|
||||||
'MediaWiki\\Hook\\SkinTemplateGetLanguageLinkHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateGetLanguageLinkHook.php',
|
'MediaWiki\\Hook\\SkinTemplateGetLanguageLinkHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateGetLanguageLinkHook.php',
|
||||||
'MediaWiki\\Hook\\SkinTemplateNavigationHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateNavigationHook.php',
|
|
||||||
'MediaWiki\\Hook\\SkinTemplateNavigation__SpecialPageHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateNavigation__SpecialPageHook.php',
|
|
||||||
'MediaWiki\\Hook\\SkinTemplateNavigation__UniversalHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateNavigation__UniversalHook.php',
|
'MediaWiki\\Hook\\SkinTemplateNavigation__UniversalHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateNavigation__UniversalHook.php',
|
||||||
'MediaWiki\\Hook\\SoftwareInfoHook' => __DIR__ . '/includes/specials/Hook/SoftwareInfoHook.php',
|
'MediaWiki\\Hook\\SoftwareInfoHook' => __DIR__ . '/includes/specials/Hook/SoftwareInfoHook.php',
|
||||||
'MediaWiki\\Hook\\SpecialBlockModifyFormFieldsHook' => __DIR__ . '/includes/specials/Hook/SpecialBlockModifyFormFieldsHook.php',
|
'MediaWiki\\Hook\\SpecialBlockModifyFormFieldsHook' => __DIR__ . '/includes/specials/Hook/SpecialBlockModifyFormFieldsHook.php',
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,6 @@ class DeprecatedHooks {
|
||||||
'userCan' => [ 'deprecatedVersion' => '1.37' ],
|
'userCan' => [ 'deprecatedVersion' => '1.37' ],
|
||||||
'ArticleDelete' => [ 'deprecatedVersion' => '1.37', 'silent' => true ],
|
'ArticleDelete' => [ 'deprecatedVersion' => '1.37', 'silent' => true ],
|
||||||
'ArticleDeleteComplete' => [ 'deprecatedVersion' => '1.37', 'silent' => true ],
|
'ArticleDeleteComplete' => [ 'deprecatedVersion' => '1.37', 'silent' => true ],
|
||||||
'SkinTemplateNavigation' => [ 'deprecatedVersion' => '1.39' ],
|
|
||||||
'SkinTemplateNavigation::SpecialPage' => [ 'deprecatedVersion' => '1.39' ],
|
|
||||||
'PersonalUrls' => [ 'deprecatedVersion' => '1.39' ],
|
'PersonalUrls' => [ 'deprecatedVersion' => '1.39' ],
|
||||||
'SearchDataForIndex' => [ 'deprecatedVersion' => '1.40', 'silent' => true ],
|
'SearchDataForIndex' => [ 'deprecatedVersion' => '1.40', 'silent' => true ],
|
||||||
'ArticleUndelete' => [ 'deprecatedVersion' => '1.40', 'silent' => true ],
|
'ArticleUndelete' => [ 'deprecatedVersion' => '1.40', 'silent' => true ],
|
||||||
|
|
|
||||||
|
|
@ -335,8 +335,6 @@ class HookRunner implements
|
||||||
\MediaWiki\Hook\SkinPreloadExistenceHook,
|
\MediaWiki\Hook\SkinPreloadExistenceHook,
|
||||||
\MediaWiki\Hook\SkinSubPageSubtitleHook,
|
\MediaWiki\Hook\SkinSubPageSubtitleHook,
|
||||||
\MediaWiki\Hook\SkinTemplateGetLanguageLinkHook,
|
\MediaWiki\Hook\SkinTemplateGetLanguageLinkHook,
|
||||||
\MediaWiki\Hook\SkinTemplateNavigationHook,
|
|
||||||
\MediaWiki\Hook\SkinTemplateNavigation__SpecialPageHook,
|
|
||||||
\MediaWiki\Hook\SkinTemplateNavigation__UniversalHook,
|
\MediaWiki\Hook\SkinTemplateNavigation__UniversalHook,
|
||||||
\MediaWiki\Hook\PersonalUrlsHook,
|
\MediaWiki\Hook\PersonalUrlsHook,
|
||||||
\MediaWiki\Hook\SoftwareInfoHook,
|
\MediaWiki\Hook\SoftwareInfoHook,
|
||||||
|
|
@ -3591,28 +3589,6 @@ class HookRunner implements
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since 1.39 Use onSkinTemplateNavigation__Universal instead
|
|
||||||
*/
|
|
||||||
public function onSkinTemplateNavigation( $sktemplate, &$links ): void {
|
|
||||||
$this->container->run(
|
|
||||||
'SkinTemplateNavigation',
|
|
||||||
[ $sktemplate, &$links ],
|
|
||||||
[ 'abortable' => false ]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since 1.39 Use onSkinTemplateNavigation__Universal instead
|
|
||||||
*/
|
|
||||||
public function onSkinTemplateNavigation__SpecialPage( $sktemplate, &$links ): void {
|
|
||||||
$this->container->run(
|
|
||||||
'SkinTemplateNavigation::SpecialPage',
|
|
||||||
[ $sktemplate, &$links ],
|
|
||||||
[ 'abortable' => false ]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function onSkinTemplateNavigation__Universal( $sktemplate, &$links ): void {
|
public function onSkinTemplateNavigation__Universal( $sktemplate, &$links ): void {
|
||||||
$this->container->run(
|
$this->container->run(
|
||||||
'SkinTemplateNavigation::Universal',
|
'SkinTemplateNavigation::Universal',
|
||||||
|
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace MediaWiki\Hook;
|
|
||||||
|
|
||||||
use SkinTemplate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is a hook handler interface, see docs/Hooks.md.
|
|
||||||
* Use the hook name "SkinTemplateNavigation" to register handlers implementing this interface.
|
|
||||||
*
|
|
||||||
* @stable to implement
|
|
||||||
* @ingroup Hooks
|
|
||||||
* @deprecated since 1.39 Use SkinTemplateNavigation__Universal instead
|
|
||||||
*/
|
|
||||||
interface SkinTemplateNavigationHook {
|
|
||||||
/**
|
|
||||||
* This hook is called on content pages after the tabs have been
|
|
||||||
* added, but before variants have been added.
|
|
||||||
*
|
|
||||||
* @since 1.35
|
|
||||||
*
|
|
||||||
* @param SkinTemplate $sktemplate
|
|
||||||
* @param array &$links Structured navigation links. This is used to alter the navigation for
|
|
||||||
* skins which use buildNavigationUrls such as Vector.
|
|
||||||
* @return void This hook must not abort, it must return no value
|
|
||||||
*
|
|
||||||
* @deprecated since 1.39 Use SkinTemplateNavigation__Universal::onSkinTemplateNavigation__Universal instead
|
|
||||||
*/
|
|
||||||
public function onSkinTemplateNavigation( $sktemplate, &$links ): void;
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace MediaWiki\Hook;
|
|
||||||
|
|
||||||
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
|
|
||||||
use SkinTemplate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is a hook handler interface, see docs/Hooks.md.
|
|
||||||
* Use the hook name "SkinTemplateNavigation::SpecialPage" to register handlers implementing this interface.
|
|
||||||
*
|
|
||||||
* @stable to implement
|
|
||||||
* @ingroup Hooks
|
|
||||||
* @deprecated since 1.39 Use SkinTemplateNavigation__Universal instead
|
|
||||||
*/
|
|
||||||
interface SkinTemplateNavigation__SpecialPageHook {
|
|
||||||
/**
|
|
||||||
* This hook is called on special pages after the special
|
|
||||||
* tab is added but before variants have been added.
|
|
||||||
*
|
|
||||||
* @since 1.35
|
|
||||||
*
|
|
||||||
* @param SkinTemplate $sktemplate
|
|
||||||
* @param array &$links Structured navigation links. This is used to alter the navigation for
|
|
||||||
* skins which use buildNavigationUrls such as Vector.
|
|
||||||
* @return void This hook must not abort, it must return no value
|
|
||||||
*
|
|
||||||
* @deprecated since 1.39 Use SkinTemplateNavigation__Universal::onSkinTemplateNavigation__Universal instead
|
|
||||||
*/
|
|
||||||
public function onSkinTemplateNavigation__SpecialPage( $sktemplate, &$links ): void;
|
|
||||||
}
|
|
||||||
|
|
@ -946,13 +946,6 @@ class SkinTemplate extends Skin {
|
||||||
protected function runOnSkinTemplateNavigationHooks( SkinTemplate $skin, &$content_navigation ) {
|
protected function runOnSkinTemplateNavigationHooks( SkinTemplate $skin, &$content_navigation ) {
|
||||||
$beforeHookAssociatedPages = array_keys( $content_navigation['associated-pages'] );
|
$beforeHookAssociatedPages = array_keys( $content_navigation['associated-pages'] );
|
||||||
$beforeHookNamespaces = array_keys( $content_navigation['namespaces'] );
|
$beforeHookNamespaces = array_keys( $content_navigation['namespaces'] );
|
||||||
$title = $this->getRelevantTitle();
|
|
||||||
if ( $title->canExist() ) {
|
|
||||||
$this->getHookRunner()->onSkinTemplateNavigation( $skin, $content_navigation );
|
|
||||||
} else {
|
|
||||||
$this->getHookRunner()->onSkinTemplateNavigation__SpecialPage(
|
|
||||||
$skin, $content_navigation );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Equiv to SkinTemplateContentActions, run
|
// Equiv to SkinTemplateContentActions, run
|
||||||
$this->getHookRunner()->onSkinTemplateNavigation__Universal(
|
$this->getHookRunner()->onSkinTemplateNavigation__Universal(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue