From 63407b7112b2385b04feb8ec6b640a82c124ee9b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 2 Jan 2012 18:26:09 +0000 Subject: [PATCH] Revert r107835 - breaks my wiki "unknown function' --- includes/Setup.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/Setup.php b/includes/Setup.php index cd4c99abc0..5db6b0b90f 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -192,7 +192,9 @@ if ( $wgUseInstantCommons ) { $wgForeignFileRepos[] = array( 'class' => 'ForeignAPIRepo', 'name' => 'wikimediacommons', - 'apibase' => wfExpandUrl( '//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, -- 2.20.1