From: Jack D. Pond Date: Tue, 9 Sep 2008 04:39:45 +0000 (+0000) Subject: Fixed so that 'EditSectionLink' hook works again. X-Git-Tag: 1.31.0-rc.0~45399 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=5216d2cad97c1e66b149f051bbbe21dcfff75687;p=lhc%2Fweb%2Fwiklou.git Fixed so that 'EditSectionLink' hook works again. Error was introduced in linker.php r38149, typo or cut and paste error when expanded to use wfMsgHtml( 'editsection-brackets' - used $url when should have been $result Also changed $url to $link as per TimStarling suggestion. --- diff --git a/includes/Linker.php b/includes/Linker.php index 176bd28197..ea7c38758f 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1452,7 +1452,7 @@ class Linker { if( !is_null( $tooltip ) ) { $attribs['title'] = wfMsg( 'editsectionhint', $tooltip ); } - $url = $this->link( $nt, wfMsg('editsection'), + $link = $this->link( $nt, wfMsg('editsection'), $attribs, array( 'action' => 'edit', 'section' => $section ), array( 'noclasses', 'known' ) @@ -1466,19 +1466,19 @@ class Linker { $attribs = " title=\"$attribs\""; } $result = null; - wfRunHooks( 'EditSectionLink', array( &$this, $nt, $section, $attribs, $url, &$result ) ); + wfRunHooks( 'EditSectionLink', array( &$this, $nt, $section, $attribs, $link, &$result ) ); 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 = wfMsgHtml( 'editsection-brackets', $url ); + $result = wfMsgHtml( 'editsection-brackets', $result ); return "$result"; } # Add the brackets and the span, and *then* run the nice new hook, with # clean and non-redundant arguments. - $result = wfMsgHtml( 'editsection-brackets', $url ); + $result = wfMsgHtml( 'editsection-brackets', $link ); $result = "$result"; wfRunHooks( 'DoEditSectionLink', array( $this, $nt, $section, $tooltip, &$result ) );