From: Chad Horohoe Date: Mon, 2 Jan 2012 14:38:19 +0000 (+0000) Subject: Revert r107042 (bug 32219, make InstantCommons protocol-relative) and do it properly... X-Git-Tag: 1.31.0-rc.0~25615 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=b582210a4e694be01a349e3d0ea7b9d38227bf5f;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 32d35a3c72..47a442ae93 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -211,6 +211,8 @@ production. language * (bug 33454) ISO-8601 week-based year number (format character 'o') is now calculated correctly with respect to timezone +* (bug 32219) InstantCommons now fetches content from Wikimedia Commons using + HTTPS when the local wiki is served over HTTPS === API changes in 1.19 === * (bug 19838) siprop=interwikimap can now use the interwiki cache. diff --git a/includes/Setup.php b/includes/Setup.php index 724e868b33..87eccb4729 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -192,7 +192,9 @@ if ( $wgUseInstantCommons ) { $wgForeignFileRepos[] = array( 'class' => 'ForeignAPIRepo', 'name' => 'wikimediacommons', - 'apibase' => '//commons.wikimedia.org/w/api.php', + 'apibase' => WebRequest::detectProtocol() === 'https' ? + 'https://commons.wikimedia.org/w/api.php' : + 'http://commons.wikimedia.org/w/api.php', 'hashLevels' => 2, 'fetchDescription' => true, 'descriptionCacheExpiry' => 43200,