From 5216d2cad97c1e66b149f051bbbe21dcfff75687 Mon Sep 17 00:00:00 2001 From: "Jack D. Pond" Date: Tue, 9 Sep 2008 04:39:45 +0000 Subject: [PATCH] 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. --- includes/Linker.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ) ); -- 2.20.1