Index: trunk/phase3/includes/Setup.php |
— | — | @@ -192,7 +192,9 @@ |
193 | 193 | $wgForeignFileRepos[] = array( |
194 | 194 | 'class' => 'ForeignAPIRepo', |
195 | 195 | 'name' => 'wikimediacommons', |
196 | | - 'apibase' => wfExpandUrl( '//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', |
197 | 199 | 'hashLevels' => 2, |
198 | 200 | 'fetchDescription' => true, |
199 | 201 | 'descriptionCacheExpiry' => 43200, |