Merge "[search] Fix method call on null value"
[lhc/web/wiklou.git] / includes / api / ApiQuerySiteinfo.php
index 1ce5761..3d56128 100644 (file)
@@ -246,6 +246,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $data['misermode'] = (bool)$config->get( 'MiserMode' );
 
                $data['maxuploadsize'] = UploadBase::getMaxUploadSize();
+               $data['minuploadchunksize'] = (int)$this->getConfig()->get( 'MinUploadChunkSize' );
 
                $data['thumblimits'] = $config->get( 'ThumbLimits' );
                ApiResult::setArrayType( $data['thumblimits'], 'BCassoc' );
@@ -539,18 +540,14 @@ class ApiQuerySiteinfo extends ApiQueryBase {
 
        protected function appendInstalledLibraries( $property ) {
                global $IP;
-               $path = "$IP/composer.lock";
+               $path = "$IP/vendor/composer/installed.json";
                if ( !file_exists( $path ) ) {
-                       // Maybe they're using mediawiki/vendor?
-                       $path = "$IP/vendor/composer.lock";
-                       if ( !file_exists( $path ) ) {
-                               return true;
-                       }
+                       return true;
                }
 
                $data = array();
-               $lock = new ComposerLock( $path );
-               foreach ( $lock->getInstalledDependencies() as $name => $info ) {
+               $installed = new ComposerInstalled( $path );
+               foreach ( $installed->getInstalledDependencies() as $name => $info ) {
                        if ( strpos( $info['type'], 'mediawiki-' ) === 0 ) {
                                // Skip any extensions or skins since they'll be listed
                                // in their proper section
@@ -803,7 +800,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                'subscribers' => array_map( array( 'SpecialVersion', 'arrayToString' ), $subscribers ),
                        );
 
-                       ApiResult::setArrayType( $arr['subscribers'], 'BCarray' );
+                       ApiResult::setArrayType( $arr['subscribers'], 'array' );
                        ApiResult::setIndexedTagName( $arr['subscribers'], 's' );
                        $data[] = $arr;
                }
@@ -854,7 +851,8 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                        'variables',
                                        'protocols',
                                        'defaultoptions',
-                               )
+                               ),
+                               ApiBase::PARAM_HELP_MSG_PER_VALUE => array(),
                        ),
                        'filteriw' => array(
                                ApiBase::PARAM_TYPE => array(