From c9397d91c1efde3812504db6cb52f2981b342dcc Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 22 Feb 2008 09:49:32 +0000 Subject: [PATCH] Fixed namespace in red link title attribute, was briefly broken --- includes/Linker.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index 11dee27a88..ea74fa527d 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -66,12 +66,12 @@ class Linker { * @param $text String: FIXME * @param $class String: CSS class of the link, default ''. */ - function getInternalLinkAttributesObj( &$nt, $text, $class = '', $title = false ) { + function getInternalLinkAttributesObj( &$nt, $text, $class = '', $titleAttr = false ) { $r = ($class != '') ? ' class="' . htmlspecialchars( $class ) . '"' : ''; - if ( $title === false ) { + if ( $titleAttr === false ) { $r .= ' title="' . $nt->getEscapedText() . '"'; } else { - $r .= ' title="' . htmlspecialchars( $title ) . '"'; + $r .= ' title="' . htmlspecialchars( $titleAttr ) . '"'; } return $r; } @@ -350,11 +350,12 @@ class Linker { } $u = $nt->escapeLocalURL( $q ); + $titleText = $nt->getPrefixedText(); if ( '' == $text ) { - $text = htmlspecialchars( $nt->getPrefixedText() ); + $text = htmlspecialchars( $titleText ); } - $title = wfMsg( 'red-link-title', $nt->getText() ); - $style = $this->getInternalLinkAttributesObj( $nt, $text, 'new', $title ); + $titleAttr = wfMsg( 'red-link-title', $titleText ); + $style = $this->getInternalLinkAttributesObj( $nt, $text, 'new', $titleAttr ); list( $inside, $trail ) = Linker::splitTrail( $trail ); $s = "{$prefix}{$text}{$inside}{$trail}"; -- 2.20.1