From: Alexandre Emsenhuber Date: Mon, 23 Jul 2012 21:06:08 +0000 (+0200) Subject: Update SkinLegacy to use newer methods to create the file link. X-Git-Tag: 1.31.0-rc.0~22924^2 X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=commitdiff_plain;h=66b10010e2d545e944d8f679802855991705af8a;p=lhc%2Fweb%2Fwiklou.git 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 --- 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() ); + } } }