Switch order of apple-touch-icon and favicon links in HTML head section to work aroun...
authorIlmari Karonen <vyznev@users.mediawiki.org>
Wed, 15 Oct 2008 21:51:21 +0000 (21:51 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Wed, 15 Oct 2008 21:51:21 +0000 (21:51 +0000)
Konqueror's handling of those links.  Should not affect other browsers in any way.

RELEASE-NOTES
includes/Skin.php

index 6cfc0d3..aac9a2c 100644 (file)
@@ -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 ===
index 765a35e..169375d 100644 (file)
@@ -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',