Remove the EditSectionLink hook
authorMatmaRex <matma.rex@gmail.com>
Fri, 17 May 2013 18:19:40 +0000 (20:19 +0200)
committerMatmaRex <matma.rex@gmail.com>
Thu, 27 Jun 2013 16:10:13 +0000 (18:10 +0200)
Deprecated since 1.14. Not used by any extensions in gerrit.

Change-Id: I5f4b381496d1e005add9bbcd9e86d4390491e0d0

RELEASE-NOTES-1.22
docs/hooks.txt
includes/Skin.php

index ca653ef..c8ade52 100644 (file)
@@ -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 ==
 
index f2c10ce..ae2a5dc 100644 (file)
@@ -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
index 53003c6..a20100a 100644 (file)
@@ -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 "<span class=\"mw-editsection\">$result</span>";
-               }
-
-               # 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 = "<span class=\"mw-editsection\">$result</span>";