From e369c0105ea67a7997653badff282196b138653b Mon Sep 17 00:00:00 2001 From: MatmaRex Date: Fri, 17 May 2013 20:19:40 +0200 Subject: [PATCH] Remove the EditSectionLink hook Deprecated since 1.14. Not used by any extensions in gerrit. Change-Id: I5f4b381496d1e005add9bbcd9e86d4390491e0d0 --- RELEASE-NOTES-1.22 | 2 ++ docs/hooks.txt | 8 -------- includes/Skin.php | 23 +---------------------- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index ca653efa6b..c8ade524dc 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -264,6 +264,8 @@ changes to languages because of Bugzilla reports. processing continues. To abort the hook, a hook function must return an explicit, boolean false or a string error message. Other falsey values are tantamount to a 'return true' in earlier versions of MediaWiki. +* BREAKING CHANGE: The EditSectionLink hook was removed after being + deprecated since MediaWiki 1.14. Use DoEditSectionLink instead. == Compatibility == diff --git a/docs/hooks.txt b/docs/hooks.txt index f2c10ce834..ae2a5dcfa7 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1019,14 +1019,6 @@ notice. $title: title of page being edited &$msg: localization message name, overridable. Default is 'editpage-tos-summary' -'EditSectionLink': Do not use, use DoEditSectionLink instead. -$skin: Skin rendering the UI -$title: Title being linked to -$section: Section to link to -$link: Default link -&$result: Result (alter this to override the generated links) -$lang: The language code to use for the link in the wfMessage function - 'EmailConfirmed': When checking that the user's email address is "confirmed". $user: User being checked $confirmed: Whether or not the email address is confirmed diff --git a/includes/Skin.php b/includes/Skin.php index 53003c67a5..a20100a155 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1583,28 +1583,7 @@ abstract class Skin extends ContextSource { array( 'noclasses', 'known' ) ); - # Run the old hook. This takes up half of the function . . . hopefully - # we can rid of it someday. - $attribs = ''; - if ( $tooltip ) { - $attribs = wfMessage( 'editsectionhint' )->rawParams( $tooltip ) - ->inLanguage( $lang )->escaped(); - $attribs = " title=\"$attribs\""; - } - $result = null; - wfRunHooks( 'EditSectionLink', array( &$this, $nt, $section, $attribs, $link, &$result, $lang ) ); - if ( !is_null( $result ) ) { - # For reverse compatibility, add the brackets *after* the hook is - # run, and even add them to hook-provided text. (This is the main - # reason that the EditSectionLink hook is deprecated in favor of - # DoEditSectionLink: it can't change the brackets or the span.) - $result = wfMessage( 'editsection-brackets' )->rawParams( $result ) - ->inLanguage( $lang )->escaped(); - return "$result"; - } - - # Add the brackets and the span, and *then* run the nice new hook, with - # clean and non-redundant arguments. + # Add the brackets and the span and run the hook. $result = wfMessage( 'editsection-brackets' )->rawParams( $link ) ->inLanguage( $lang )->escaped(); $result = "$result"; -- 2.20.1