r98340 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98339‎ | r98340 | r98341 >
Date:18:14, 28 September 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
wikiLove.core: fix breakage on 1.17 wikis with protocol-relative wgServer (bug 31180)
* See inline comments
* Switched around the first two comparisons (the normal one for 1.18+ first, and the fallback one later
* Fix comment, it's a fallback for 1.17, not for 1.18
* Clarify comment regarding the reason to prepend wgServer
(Follows-up r98216)
Modified paths:
  • /trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
@@ -685,12 +685,15 @@
686686
687687 // If we were already on the user talk page, then reload the page so that the
688688 // new WikiLove message is displayed.
 689+ // @todo: an expandUrl() would be very nice indeed!
689690 if (
690 - targetBaseUrl === currentBaseUrl
691 - // Compatibility with 1.17, 1.18
692 - || mw.config.get( 'wgServer' ) + targetBaseUrl === currentBaseUrl
693 - // Compatibility with protocol-relative URLs
 691+ mw.config.get( 'wgServer' ) + targetBaseUrl === currentBaseUrl
 692+ // Compatibility with 1.17 (mw.util.wikiGetlink prepends wgServer in 1.17)
 693+ || targetBaseUrl === currentBaseUrl
 694+ // Compatibility with protocol-relative URLs in 1.18+
694695 || window.location.protocol + mw.config.get( 'wgServer' ) + targetBaseUrl === currentBaseUrl
 696+ // Compatibility with protocol-relative URLs in 1.17
 697+ || window.location.protocol + targetBaseUrl === currentBaseUrl
695698 ) {
696699 window.location.reload();
697700 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r983521.18wmf1: MFT r98340catrope19:18, 28 September 2011
r983531.17wmf1: MFT r98340catrope19:19, 28 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98216WikiLove: Fix bug observed on the cluster where protocol-relative URLs were b...catrope11:24, 27 September 2011

Comments

#Comment by Krinkle (talk | contribs)   18:19, 28 September 2011

Adding 1.17wmf1 tag (most important).

1.18 and 1.18wmf1 are less important, but should probably also be updated.

Status & tagging log