Merge "Fixed detection of unsigned mysql column in updater"
[lhc/web/wiklou.git] / includes / api / ApiUpload.php
index d6ad7f3..78a4971 100644 (file)
@@ -218,7 +218,11 @@ class ApiUpload extends ApiBase {
                        $status = $this->mUpload->addChunk(
                                $chunkPath, $chunkSize, $this->mParams['offset'] );
                        if ( !$status->isGood() ) {
-                               $this->dieUsage( $status->getWikiText(), 'stashfailed' );
+                               $extradata = array(
+                                       'offset' => $this->mUpload->getOffset(),
+                               );
+
+                               $this->dieUsage( $status->getWikiText(), 'stashfailed', 0, $extradata );
 
                                return array();
                        }
@@ -277,7 +281,7 @@ class ApiUpload extends ApiBase {
         */
        private function performStash() {
                try {
-                       $stashFile = $this->mUpload->stashFile();
+                       $stashFile = $this->mUpload->stashFile( $this->getUser() );
 
                        if ( !$stashFile ) {
                                throw new MWException( 'Invalid stashed file' );