r53841 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53840‎ | r53841 | r53842 >
Date:23:42, 27 July 2009
Author:demon
Status:reverted (Comments)
Tags:
Comment:
(bug 19392) Favicon, apple-touch-icon links matching the defaults should not be sent
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -156,7 +156,7 @@
157157 $wgUploadDirectory = false; ///< defaults to "{$IP}/images"
158158 $wgHashedUploadDirectory = true;
159159 $wgLogo = false; ///< defaults to "{$wgStylePath}/common/images/wiki.png"
160 -$wgFavicon = '/favicon.ico';
 160+$wgFavicon = false; ///< will be treated as '/favicon.ico' anyway by user agents
161161 $wgAppleTouchIcon = false; ///< This one'll actually default to off. For iPhone and iPod Touch web app bookmarks
162162 $wgMathPath = false; ///< defaults to "{$wgUploadPath}/math"
163163 $wgMathDirectory = false; ///< defaults to "{$wgUploadDirectory}/math"
Index: trunk/phase3/includes/Skin.php
@@ -178,15 +178,17 @@
179179
180180 wfProfileIn( __METHOD__ );
181181
 182+ # Add favicons and Apple touch icons, if they're not the defaults
 183+ #
182184 # Generally the order of the favicon and apple-touch-icon links
183185 # should not matter, but Konqueror (3.5.9 at least) incorrectly
184186 # uses whichever one appears later in the HTML source. Make sure
185187 # apple-touch-icon is specified first to avoid this.
186 - if( false !== $wgAppleTouchIcon ) {
 188+ if( false !== $wgAppleTouchIcon && wfExpandUrl('/apple-touch-icon.png') != wfExpandUrl($wgAppleTouchIcon) ) {
187189 $out->addLink( array( 'rel' => 'apple-touch-icon', 'href' => $wgAppleTouchIcon ) );
188190 }
189191
190 - if( false !== $wgFavicon ) {
 192+ if( false !== $wgFavicon && wfExpandUrl('/favicon.ico') != wfExpandUrl($wgFavicon) ) {
191193 $out->addLink( array( 'rel' => 'shortcut icon', 'href' => $wgFavicon ) );
192194 }
193195
Index: trunk/phase3/RELEASE-NOTES
@@ -341,6 +341,8 @@
342342 * (bugs 18407, 18409) Special:Upload is now listed on Special:Specialpages only
343343 if uploads are enabled and the user can access it
344344 * (bug 17988) Spaces before [[Category:]] links are no longer ignored
 345+* (bug 19392) Favicon, apple-touch-icon links matching the defaults are no
 346+ longer sent
345347
346348 == API changes in 1.16 ==
347349

Follow-up revisions

RevisionCommit summaryAuthorDate
r55588Revert r53841 (Favicon, apple-touch-icon links matching the defaults should n...demon22:27, 25 August 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   19:11, 21 August 2009

My impression is that this is wrong; that at least some agents do require these to be specified explicitly such as Firefox.

#Comment by 😂 (talk | contribs)   22:28, 25 August 2009

Reverted in r55588.

Status & tagging log