Follow up r74725. Also add $lang parameter to EditSectionLink.
authorPlatonides <platonides@users.mediawiki.org>
Thu, 14 Oct 2010 22:13:43 +0000 (22:13 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Thu, 14 Oct 2010 22:13:43 +0000 (22:13 +0000)
Document the changes in hooks.txt

docs/hooks.txt
includes/Linker.php

index e5ffb0f..63e504a 100644 (file)
@@ -637,8 +637,9 @@ $section: The designation of the section being pointed to, to be included in
   the link, like "&section=$section"
 $tooltip: The default tooltip.  Escape with htmlspecialchars() before using.
   By default, this is wrapped in the 'editsectionhint' message.
-$result: The HTML to return, prefilled with the default plus whatever other
+&$result: The HTML to return, prefilled with the default plus whatever other
   changes earlier hooks have made
+$lang: The language code to use for the link in the wfMsg* functions
 
 'EditFilter': Perform checks on an edit
 $editor: Edit form (see includes/EditPage.php)
@@ -737,7 +738,8 @@ $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)
+&$result: Result (alter this to override the generated links)
+$lang: The language code to use for the link in the wfMsg* functions
 
 'EmailConfirmed': When checking that the user's email address is "confirmed"
 $user: User being checked
index 76ecf79..3c27747 100644 (file)
@@ -1395,7 +1395,7 @@ class Linker {
                        $attribs = " title=\"$attribs\"";
                }
                $result = null;
-               wfRunHooks( 'EditSectionLink', array( &$this, $nt, $section, $attribs, $link, &$result ) );
+               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
@@ -1410,7 +1410,7 @@ class Linker {
                $result = wfMsgExt( 'editsection-brackets', array( 'escape', 'replaceafter', 'language' => $lang ), $link );
                $result = "<span class=\"editsection\">$result</span>";
 
-               wfRunHooks( 'DoEditSectionLink', array( $this, $nt, $section, $tooltip, &$result , $lang) );
+               wfRunHooks( 'DoEditSectionLink', array( $this, $nt, $section, $tooltip, &$result, $lang ) );
                return $result;
        }