Merge "Update limit/urlwidth param doc of prop=imageinfo"
[lhc/web/wiklou.git] / includes / site / MediaWikiSite.php
index 0509272..4cd48b8 100644 (file)
@@ -130,7 +130,7 @@ class MediaWikiSite extends Site {
                                // Also consider smaxage if maxage is used.
                        );
 
-                       $url = $this->getFileUrl( 'api.php' ) . '?' . wfArrayToCgi( $args );
+                       $url = wfAppendQuery( $this->getFileUrl( wfScript( 'api' ) ), $args );
 
                        // Go on call the external site
                        //@todo: we need a good way to specify a timeout here.
@@ -185,7 +185,7 @@ class MediaWikiSite extends Site {
                // the single page in the "pages" substructure.
                if ( isset( $externalData['query']['pages'] ) ) {
                        $pages = array_values( $externalData['query']['pages'] );
-                       if ( count( $pages) === 1 ) {
+                       if ( count( $pages ) === 1 ) {
                                return $pages[0];
                        }
                }