r107833 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107832‎ | r107833 | r107834 >
Date:14:38, 2 January 2012
Author:demon
Status:ok (Comments)
Tags:
Comment:
Revert r107042 (bug 32219, make InstantCommons protocol-relative) and do it properly + release notes.

apibase is used for fetching content from the server as well as determining description pages, so should use a full-qualified protocol when the site's in https.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -211,6 +211,8 @@
212212 language
213213 * (bug 33454) ISO-8601 week-based year number (format character 'o') is now
214214 calculated correctly with respect to timezone
 215+* (bug 32219) InstantCommons now fetches content from Wikimedia Commons using
 216+ HTTPS when the local wiki is served over HTTPS
215217
216218 === API changes in 1.19 ===
217219 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
Index: trunk/phase3/includes/Setup.php
@@ -192,7 +192,9 @@
193193 $wgForeignFileRepos[] = array(
194194 'class' => 'ForeignAPIRepo',
195195 'name' => 'wikimediacommons',
196 - 'apibase' => '//commons.wikimedia.org/w/api.php',
 196+ 'apibase' => WebRequest::detectProtocol() === 'https' ?
 197+ 'https://commons.wikimedia.org/w/api.php' :
 198+ 'http://commons.wikimedia.org/w/api.php',
197199 'hashLevels' => 2,
198200 'fetchDescription' => true,
199201 'descriptionCacheExpiry' => 43200,

Follow-up revisions

RevisionCommit summaryAuthorDate
r107835simplify r107833 per CR, just use wfExpandUrl()demon15:31, 2 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107042Make apibase of $wgForeignFileRepos (InstantCommons) protocol relative tooraymond08:33, 22 December 2011

Comments

#Comment by 😂 (talk | contribs)   14:42, 2 January 2012

s/full-qualified protocol when the site's in https/fully-qualified protocol/

I changed my commit summary like 4 times ;-)

#Comment by Krinkle (talk | contribs)   15:18, 2 January 2012

So basically wfExpandUrl( .. , PROTO_CURRENT);

#Comment by 😂 (talk | contribs)   15:19, 2 January 2012

I suppose we could do that too :)

Status & tagging log