}
UploadBase::setSessionStatus(
$this->mParams['filekey'],
- array( 'result' => 'Poll', 'status' => Status::newGood() )
+ array( 'result' => 'Poll',
+ 'stage' => 'queued', 'status' => Status::newGood() )
);
$retVal = 1;
$cmd = wfShellWikiCmd(
throw new MWException( "No user with ID " . $this->getOption( 'userid' ) . "." );
}
+ UploadBase::setSessionStatus(
+ $this->getOption( 'filekey' ),
+ array( 'result' => 'Poll', 'stage' => 'assembling', 'status' => Status::newGood() )
+ );
+
$upload = new UploadFromChunks( $user );
$upload->continueChunks(
$this->getOption( 'filename' ),
if ( !$status->isGood() ) {
UploadBase::setSessionStatus(
$this->getOption( 'filekey' ),
- array( 'result' => 'Failure', 'status' => $status )
+ array( 'result' => 'Failure', 'stage' => 'assembling', 'status' => $status )
);
session_write_close();
$this->error( $status->getWikiText() . "\n", 1 ); // die
$this->getOption( 'filekey' ),
array(
'result' => 'Success',
+ 'stage' => 'assembling',
'filekey' => $newFileKey,
'imageinfo' => $imageInfo,
'status' => Status::newGood()
$this->getOption( 'filekey' ),
array(
'result' => 'Failure',
+ 'stage' => 'assembling',
'status' => Status::newFatal( 'api-error-stashfailed' )
)
);
* @return void
*/
public static function setSessionStatus( $statusKey, $value ) {
- $_SESSION[self::SESSION_STATUS_KEY][$statusKey] = $value;
+ if ( $value === false ) {
+ unset( $_SESSION[self::SESSION_STATUS_KEY][$statusKey] );
+ } else {
+ $_SESSION[self::SESSION_STATUS_KEY][$statusKey] = $value;
+ }
}
}