Merge "Support all values for exif PhotometricInterpretation"
[lhc/web/wiklou.git] / includes / api / ApiUpload.php
index 5e13e98..e76b365 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 );
        }
 
@@ -624,7 +627,6 @@ class ApiUpload extends ApiBase {
        protected function transformWarnings( $warnings ) {
                if ( $warnings ) {
                        // Add indices
-                       $result = $this->getResult();
                        ApiResult::setIndexedTagName( $warnings, 'warning' );
 
                        if ( isset( $warnings['duplicate'] ) ) {
@@ -730,7 +732,6 @@ class ApiUpload extends ApiBase {
 
                // Deprecated parameters
                if ( $this->mParams['watch'] ) {
-                       $this->logFeatureUsage( 'action=upload&watch' );
                        $watch = true;
                }