@@ 66-75 (lines=10) @@ | ||
63 | ||
64 | // Combine all of the chunks into a local file and upload that to a new stash file |
|
65 | $status = $upload->concatenateChunks(); |
|
66 | if ( !$status->isGood() ) { |
|
67 | UploadBase::setSessionStatus( |
|
68 | $user, |
|
69 | $this->params['filekey'], |
|
70 | [ 'result' => 'Failure', 'stage' => 'assembling', 'status' => $status ] |
|
71 | ); |
|
72 | $this->setLastError( $status->getWikiText( false, false, 'en' ) ); |
|
73 | ||
74 | return false; |
|
75 | } |
|
76 | ||
77 | // We can only get warnings like 'duplicate' after concatenating the chunks |
|
78 | $status = Status::newGood(); |
@@ 89-98 (lines=10) @@ | ||
86 | $user, |
|
87 | isset( $this->params['tags'] ) ? $this->params['tags'] : [] |
|
88 | ); |
|
89 | if ( !$status->isGood() ) { |
|
90 | UploadBase::setSessionStatus( |
|
91 | $user, |
|
92 | $this->params['filekey'], |
|
93 | [ 'result' => 'Failure', 'stage' => 'publish', 'status' => $status ] |
|
94 | ); |
|
95 | $this->setLastError( $status->getWikiText( false, false, 'en' ) ); |
|
96 | ||
97 | return false; |
|
98 | } |
|
99 | ||
100 | // Build the image info array while we have the local reference handy |
|
101 | $apiMain = new ApiMain(); // dummy object (XXX) |