X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQuerySiteinfo.php;h=a8c037ec6a862fc3ca6ffdd845c928423e2502fb;hb=872dc01de3bfae0db3f952b75b95d98beb47449e;hp=0bb7ff8ef1b71a34750d4f32a032075c8e734207;hpb=c99b37bdc05650a38b44f18429437bab6ecc91a8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 0bb7ff8ef1..a8c037ec6a 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -23,6 +23,7 @@ * * @file */ +use MediaWiki\MediaWikiServices; /** * A query action to return meta information about the wiki site. @@ -253,6 +254,8 @@ class ApiQuerySiteinfo extends ApiQueryBase { $data['maxuploadsize'] = UploadBase::getMaxUploadSize(); $data['minuploadchunksize'] = (int)$config->get( 'MinUploadChunkSize' ); + $data['galleryoptions'] = $config->get( 'GalleryOptions' ); + $data['thumblimits'] = $config->get( 'ThumbLimits' ); ApiResult::setArrayType( $data['thumblimits'], 'BCassoc' ); ApiResult::setIndexedTagName( $data['thumblimits'], 'limit' ); @@ -386,7 +389,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { $langCode = isset( $params['inlanguagecode'] ) ? $params['inlanguagecode'] : ''; $langNames = Language::fetchLanguageNames( $langCode ); - $getPrefixes = Interwiki::getAllPrefixes( $local ); + $getPrefixes = MediaWikiServices::getInstance()->getInterwikiLookup()->getAllPrefixes( $local ); $extraLangPrefixes = $this->getConfig()->get( 'ExtraInterlanguageLinkPrefixes' ); $localInterwikis = $this->getConfig()->get( 'LocalInterwikis' ); $data = []; @@ -445,10 +448,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { $showHostnames = $this->getConfig()->get( 'ShowHostnames' ); if ( $includeAll ) { if ( !$showHostnames ) { - $this->dieUsage( - 'Cannot view all servers info unless $wgShowHostnames is true', - 'includeAllDenied' - ); + $this->dieWithError( 'apierror-siteinfo-includealldenied', 'includeAllDenied' ); } $lags = $lb->getLagTimes(); @@ -772,7 +772,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { } public function appendProtocols( $property ) { - // Make a copy of the global so we don't try to set the _element key of it - bug 45130 + // Make a copy of the global so we don't try to set the _element key of it - T47130 $protocols = array_values( $this->getConfig()->get( 'UrlProtocols' ) ); ApiResult::setArrayType( $protocols, 'BCarray' ); ApiResult::setIndexedTagName( $protocols, 'p' );