// 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'];
}
$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 );
}
protected function transformWarnings( $warnings ) {
if ( $warnings ) {
// Add indices
- $result = $this->getResult();
ApiResult::setIndexedTagName( $warnings, 'warning' );
if ( isset( $warnings['duplicate'] ) ) {
// Deprecated parameters
if ( $this->mParams['watch'] ) {
- $this->logFeatureUsage( 'action=upload&watch' );
$watch = true;
}