From 66b10010e2d545e944d8f679802855991705af8a Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 23 Jul 2012 23:06:08 +0200 Subject: [PATCH] Update SkinLegacy to use newer methods to create the file link. Linker::getInternalLinkAttributes() is an horrible old thing that I would like to deprecate, and that's the last usage of it I could find. Change-Id: Icbda801bf8240cf2e4e23d6b99406e3a909e9d0b --- includes/SkinLegacy.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/SkinLegacy.php b/includes/SkinLegacy.php index 63852505f5..4a1c699512 100644 --- a/includes/SkinLegacy.php +++ b/includes/SkinLegacy.php @@ -446,13 +446,13 @@ class LegacyTemplate extends BaseTemplate { if ( $wgOut->isArticleRelated() ) { if ( $title->getNamespace() == NS_FILE ) { - $name = $title->getDBkey(); $image = wfFindFile( $title ); if ( $image ) { - $link = htmlspecialchars( $image->getURL() ); - $style = Linker::getInternalLinkAttributes( $link, $name ); - $s[] = "{$name}"; + $href = $image->getURL(); + $s[] = Html::element( 'a', array( 'href' => $href, + 'title' => $href ), $title->getText() ); + } } } -- 2.20.1