simplify r107833 per CR, just use wfExpandUrl()
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 2 Jan 2012 15:31:28 +0000 (15:31 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 2 Jan 2012 15:31:28 +0000 (15:31 +0000)
includes/Setup.php

index 87eccb4..9cee0f2 100644 (file)
@@ -192,9 +192,7 @@ if ( $wgUseInstantCommons ) {
        $wgForeignFileRepos[] = array(
                'class'                   => 'ForeignAPIRepo',
                'name'                    => 'wikimediacommons',
-               'apibase'                 => WebRequest::detectProtocol() === 'https' ?
-                       'https://commons.wikimedia.org/w/api.php' :
-                       'http://commons.wikimedia.org/w/api.php',
+               'apibase'                 => wfExpandUrl( '//commons.wikimedia.org/w/api.php' ),
                'hashLevels'              => 2,
                'fetchDescription'        => true,
                'descriptionCacheExpiry'  => 43200,