Fix casing of function calls in API
[lhc/web/wiklou.git] / includes / api / ApiQuerySiteinfo.php
index bcd5d9e..4f90e5f 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' );
@@ -496,7 +497,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                        $arr['number'] = SiteStats::users();
                                // '*' and autopromote groups have no size
                                } elseif ( $group !== '*' && !isset( $autopromote[$group] ) ) {
-                                       $arr['number'] = SiteStats::numberInGroup( $group );
+                                       $arr['number'] = SiteStats::numberingroup( $group );
                                }
                        }
 
@@ -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;
                }