Merge "Convert JobQueueGroup::getCachedConfigVar to using WAN cache"
[lhc/web/wiklou.git] / includes / api / ApiUpload.php
index 5e13e98..f51b389 100644 (file)
@@ -53,7 +53,6 @@ class ApiUpload extends ApiBase {
 
                // Copy the session key to the file key, for backward compatibility.
                if ( !$this->mParams['filekey'] && $this->mParams['sessionkey'] ) {
-                       $this->logFeatureUsage( 'action=upload&sessionkey' );
                        $this->mParams['filekey'] = $this->mParams['sessionkey'];
                }
 
@@ -363,6 +362,10 @@ class ApiUpload extends ApiBase {
                $data['invalidparameter'] = $parameter;
 
                $parsed = $this->parseMsg( $error );
+               if ( isset( $parsed['data'] ) ) {
+                       $data = array_merge( $data, $parsed['data'] );
+               }
+
                $this->dieUsage( $parsed['info'], $parsed['code'], 0, $data );
        }
 
@@ -730,7 +733,6 @@ class ApiUpload extends ApiBase {
 
                // Deprecated parameters
                if ( $this->mParams['watch'] ) {
-                       $this->logFeatureUsage( 'action=upload&watch' );
                        $watch = true;
                }