jenkins-bot has submitted this change and it was merged.

Change subject: Remove the EditSectionLink hook
......................................................................


Remove the EditSectionLink hook

Deprecated since 1.14. Not used by any extensions in gerrit.

Change-Id: I5f4b381496d1e005add9bbcd9e86d4390491e0d0
---
M RELEASE-NOTES-1.22
M docs/hooks.txt
M includes/Skin.php
3 files changed, 3 insertions(+), 30 deletions(-)

Approvals:
  Demon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index ca653ef..c8ade52 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -264,6 +264,8 @@
   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 f2c10ce..ae2a5dc 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1019,14 +1019,6 @@
 $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 53003c6..a20100a 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -1583,28 +1583,7 @@
                        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>";

-- 
To view, visit https://gerrit.wikimedia.org/r/64364
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f4b381496d1e005add9bbcd9e86d4390491e0d0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to