From 3f8b2a112bdda934b2e6d912e594afde890cbc30 Mon Sep 17 00:00:00 2001 From: Ilmari Karonen Date: Thu, 21 Aug 2008 07:42:43 +0000 Subject: [PATCH] Same for other skins, modify release note accordingly. --- RELEASE-NOTES | 4 ++-- includes/Skin.php | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index adefdbdc2e..118c38ea75 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -139,8 +139,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Fix excessive memory usage when parsing pages with lots of links * $wgSpamRegex now matches the edit summary and page move descriptions in addition to body text. -* The "image" tab on the Monobook skin now appears blue for images available - from a shared repository +* Navigation links to images available from a shared repository (like Commons) + from their local talk pages no longer appear as redlinks === API changes in 1.14 === diff --git a/includes/Skin.php b/includes/Skin.php index d8c1232a63..0cb732246f 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1605,6 +1605,8 @@ END; return ''; } + $linkOptions = array(); + if( $wgTitle->isTalkPage() ) { $link = $wgTitle->getSubjectPage(); switch( $link->getNamespace() ) { @@ -1619,6 +1621,9 @@ END; break; case NS_IMAGE: $text = wfMsg( 'imagepage' ); + # Make link known if image exists, even if the desc. page doesn't. + if( wfFindFile( $link ) ) + $linkOptions[] = 'known'; break; case NS_MEDIAWIKI: $text = wfMsg( 'mediawikipage' ); @@ -1640,7 +1645,7 @@ END; $text = wfMsg( 'talkpage' ); } - $s = $this->makeLinkObj( $link, $text ); + $s = $this->link( $link, $text, array(), array(), $linkOptions ); return $s; } -- 2.20.1