From: Platonides Date: Thu, 14 Oct 2010 22:13:43 +0000 (+0000) Subject: Follow up r74725. Also add $lang parameter to EditSectionLink. X-Git-Tag: 1.31.0-rc.0~34494 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=76167d9f27dc9b5899f7f32791b7701fa999bedc;p=lhc%2Fweb%2Fwiklou.git Follow up r74725. Also add $lang parameter to EditSectionLink. Document the changes in hooks.txt --- diff --git a/docs/hooks.txt b/docs/hooks.txt index e5ffb0f82f..63e504a7ee 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -637,8 +637,9 @@ $section: The designation of the section being pointed to, to be included in the link, like "§ion=$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 diff --git a/includes/Linker.php b/includes/Linker.php index 76ecf79d01..3c27747dba 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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 = "$result"; - wfRunHooks( 'DoEditSectionLink', array( $this, $nt, $section, $tooltip, &$result , $lang) ); + wfRunHooks( 'DoEditSectionLink', array( $this, $nt, $section, $tooltip, &$result, $lang ) ); return $result; }