Merge "Added spaces before and removed spaces after 'array'"
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index 80bca2f..76f9b42 100644 (file)
@@ -83,7 +83,7 @@ class ApiMain extends ApiBase {
                'import' => 'ApiImport',
                'userrights' => 'ApiUserrights',
                'options' => 'ApiOptions',
-               'imagerotate' =>'ApiImageRotate',
+               'imagerotate' => 'ApiImageRotate',
        );
 
        /**
@@ -418,7 +418,7 @@ class ApiMain extends ApiBase {
                }
 
                // Log the request whether or not there was an error
-               $this->logRequest( microtime( true ) - $t);
+               $this->logRequest( microtime( true ) - $t );
 
                // Send cache headers after any code which might generate an error, to
                // avoid sending public cache headers for errors.
@@ -863,7 +863,7 @@ class ApiMain extends ApiBase {
                        ' ' . $request->getMethod() .
                        ' ' . wfUrlencode( str_replace( ' ', '_', $this->getUser()->getName() ) ) .
                        ' ' . $request->getIP() .
-                       ' T=' . $milliseconds .'ms';
+                       ' T=' . $milliseconds . 'ms';
                foreach ( $this->getParamsUsed() as $name ) {
                        $value = $request->getVal( $name );
                        if ( $value === null ) {
@@ -1048,6 +1048,7 @@ class ApiMain extends ApiBase {
                        'servedby' => 'Include the hostname that served the request in the results. Unconditionally shown on error',
                        'origin' => array(
                                'When accessing the API using a cross-domain AJAX request (CORS), set this to the originating domain.',
+                               'This must be included in any pre-flight request, and therefore must be part of the request URI (not the POST body).',
                                'This must match one of the origins in the Origin: header exactly, so it has to be set to something like http://en.wikipedia.org or https://meta.wikimedia.org .',
                                'If this parameter does not match the Origin: header, a 403 response will be returned.',
                                'If this parameter matches the Origin: header and the origin is whitelisted, an Access-Control-Allow-Origin header will be set.',