From: Ilmari Karonen Date: Wed, 15 Oct 2008 21:51:21 +0000 (+0000) Subject: Switch order of apple-touch-icon and favicon links in HTML head section to work aroun... X-Git-Tag: 1.31.0-rc.0~44730 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=261f9588066f756cbac1ff4412b36fa54d621987;p=lhc%2Fweb%2Fwiklou.git Switch order of apple-touch-icon and favicon links in HTML head section to work around a quirk in Konqueror's handling of those links. Should not affect other browsers in any way. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6cfc0d3738..aac9a2c0dd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -264,6 +264,8 @@ The following extensions are migrated into MediaWiki 1.14: * (bug 14178) Some uses of UserLoadFromSession hook cause segfault * (bug 15925) Postitive bytes added on recentchanges and watchlists are now bolded if above the threshold, previously it only worked for negatives +* Specify apple-touch-icon before favicon in HTML head section to make the Konqueror + browser correctly use the latter === API changes in 1.14 === diff --git a/includes/Skin.php b/includes/Skin.php index 765a35eaa1..169375dd1d 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -176,14 +176,18 @@ class Skin extends Linker { wfProfileIn( __METHOD__ ); - if( false !== $wgFavicon ) { - $out->addLink( array( 'rel' => 'shortcut icon', 'href' => $wgFavicon ) ); - } - + # Generally the order of the favicon and apple-touch-icon links + # should not matter, but Konqueror (3.5.9 at least) incorrectly + # uses whichever one appears later in the HTML source. Make sure + # apple-touch-icon is specified first to avoid this. if( false !== $wgAppleTouchIcon ) { $out->addLink( array( 'rel' => 'apple-touch-icon', 'href' => $wgAppleTouchIcon ) ); } + if( false !== $wgFavicon ) { + $out->addLink( array( 'rel' => 'shortcut icon', 'href' => $wgFavicon ) ); + } + # OpenSearch description link $out->addLink( array( 'rel' => 'search',