* @ingroup FileRepo
*/
+use MediaWiki\Logger\LoggerFactory;
+
/**
* A foreign repository with a remote MediaWiki with an API thingy
*
* $wgForeignFileRepos[] = array(
* 'class' => 'ForeignAPIRepo',
* 'name' => 'shared',
- * 'apibase' => 'http://en.wikipedia.org/w/api.php',
+ * 'apibase' => 'https://en.wikipedia.org/w/api.php',
* 'fetchDescription' => true, // Optional
* 'descriptionCacheExpiry' => 3600,
* );
global $wgLocalFileRepo;
parent::__construct( $info );
- // http://commons.wikimedia.org/w/api.php
+ // https://commons.wikimedia.org/w/api.php
$this->mApiBase = isset( $info['apibase'] ) ? $info['apibase'] : null;
if ( isset( $info['apiThumbCacheExpiry'] ) ) {
if ( $status->isOK() ) {
return $req->getContent();
} else {
+ $logger = LoggerFactory::getInstance( 'http' );
+ $logger->warning( $status->getWikiText(), array( 'caller' => 'ForeignAPIRepo::httpGet' ) );
return false;
}
}