hooks: Remove deprecated SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook
The SkinTemplatePreventOtherActiveTabs hook was marked as deprecated in MediaWiki 1.35. Bug: T284950 Change-Id: I9a4806047f8d31d59a00e02145906672b85c004c
This commit is contained in:
parent
a11aceb214
commit
3bcf989f72
6 changed files with 2 additions and 69 deletions
|
|
@ -285,6 +285,8 @@ because of Phabricator reports.
|
|||
* The SkinTemplatePreventOtherActiveTabs hook, deprecated in 1.35, was removed
|
||||
entirely.
|
||||
* The SkinTemplateTabAction hook, deprecated in 1.35, was removed entirely.
|
||||
* The SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook, deprecated in 1.35,
|
||||
was removed entirely.
|
||||
* …
|
||||
|
||||
=== Deprecations in 1.37 ===
|
||||
|
|
|
|||
|
|
@ -1006,7 +1006,6 @@ $wgAutoloadLocalClasses = [
|
|||
'MediaWiki\\Hook\\SkinGetPoweredByHook' => __DIR__ . '/includes/skins/Hook/SkinGetPoweredByHook.php',
|
||||
'MediaWiki\\Hook\\SkinPreloadExistenceHook' => __DIR__ . '/includes/skins/Hook/SkinPreloadExistenceHook.php',
|
||||
'MediaWiki\\Hook\\SkinSubPageSubtitleHook' => __DIR__ . '/includes/skins/Hook/SkinSubPageSubtitleHook.php',
|
||||
'MediaWiki\\Hook\\SkinTemplateBuildNavUrlsNav_urlsAfterPermalinkHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateBuildNavUrlsNav_urlsAfterPermalinkHook.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',
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ class DeprecatedHooks {
|
|||
'RollbackComplete' => [ 'deprecatedVersion' => '1.36', 'silent' => true ],
|
||||
'SecondaryDataUpdates' => [ 'deprecatedVersion' => '1.32', 'silent' => true ],
|
||||
'SpecialMuteSubmit' => [ 'deprecatedVersion' => '1.35', 'silent' => true ],
|
||||
'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' => [ 'deprecatedVersion' => '1.35' ],
|
||||
'SkinTemplateOutputPageBeforeExec' => [ 'deprecatedVersion' => '1.35' ],
|
||||
'SkinTemplateToolboxEnd' => [ 'deprecatedVersion' => '1.35' ],
|
||||
'UserLoadFromDatabase' => [ 'deprecatedVersion' => '1.37' ],
|
||||
|
|
|
|||
|
|
@ -323,7 +323,6 @@ class HookRunner implements
|
|||
\MediaWiki\Hook\SkinGetPoweredByHook,
|
||||
\MediaWiki\Hook\SkinPreloadExistenceHook,
|
||||
\MediaWiki\Hook\SkinSubPageSubtitleHook,
|
||||
\MediaWiki\Hook\SkinTemplateBuildNavUrlsNav_urlsAfterPermalinkHook,
|
||||
\MediaWiki\Hook\SkinTemplateGetLanguageLinkHook,
|
||||
\MediaWiki\Hook\SkinTemplateNavigationHook,
|
||||
\MediaWiki\Hook\SkinTemplateNavigation__SpecialPageHook,
|
||||
|
|
@ -3458,15 +3457,6 @@ class HookRunner implements
|
|||
);
|
||||
}
|
||||
|
||||
public function onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink( $sktemplate,
|
||||
&$nav_urls, &$revid, &$revid2
|
||||
) {
|
||||
return $this->container->run(
|
||||
'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink',
|
||||
[ $sktemplate, &$nav_urls, &$revid, &$revid2 ]
|
||||
);
|
||||
}
|
||||
|
||||
public function onSkinTemplateGetLanguageLink( &$languageLink,
|
||||
$languageLinkTitle, $title, $outputPage
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -1,30 +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 "SkinTemplateBuildNavUrlsNav_urlsAfterPermalink" to register handlers implementing this interface.
|
||||
*
|
||||
* @deprecated since 1.35. Use SidebarBeforeOutput hook
|
||||
* @ingroup Hooks
|
||||
*/
|
||||
interface SkinTemplateBuildNavUrlsNav_urlsAfterPermalinkHook {
|
||||
/**
|
||||
* This hook is called after creating the "permanent link" tab.
|
||||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param SkinTemplate $sktemplate
|
||||
* @param array &$nav_urls Array of tabs
|
||||
* @param int &$revid Revision ID of the permanent link
|
||||
* @param int &$revid2 Revision ID of the permanent link, second time
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink( $sktemplate,
|
||||
&$nav_urls, &$revid, &$revid2
|
||||
);
|
||||
}
|
||||
|
|
@ -1337,33 +1337,6 @@ class SkinTemplate extends Skin {
|
|||
return $content_actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* build array of common navigation links and run
|
||||
* the SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook.
|
||||
* @inheritDoc
|
||||
* @return array
|
||||
*/
|
||||
protected function buildNavUrls() {
|
||||
$navUrls = parent::buildNavUrls();
|
||||
$out = $this->getOutput();
|
||||
if ( !$out->isArticle() ) {
|
||||
return $navUrls;
|
||||
}
|
||||
$modifiedNavUrls = [];
|
||||
foreach ( $navUrls as $key => $url ) {
|
||||
$modifiedNavUrls[$key] = $url;
|
||||
if ( $key === 'permalink' ) {
|
||||
$revid = $out->getRevisionId();
|
||||
// Use the copy of revision ID in case this undocumented,
|
||||
// shady hook tries to mess with internals.
|
||||
$this->getHookRunner()->onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink(
|
||||
$this, $modifiedNavUrls, $revid, $revid
|
||||
);
|
||||
}
|
||||
}
|
||||
return $modifiedNavUrls;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate strings used for xml 'id' names
|
||||
* @deprecated since 1.35, use Title::getNamespaceKey() instead
|
||||
|
|
|
|||
Loading…
Reference in a new issue