Also move creation of UploadStash to main entry point of the special
page to avoid use of context before it is set (by called getUser).
Change-Id: Ibcb17b6ee1b853d807f91104ba428b307e9a5208
'UploadStashFileException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashFileNotFoundException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashNoSuchKeyException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashFileException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashFileNotFoundException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashNoSuchKeyException' => __DIR__ . '/includes/upload/UploadStash.php',
- 'UploadStashNotAvailableException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashNotLoggedInException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashWrongOwnerException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashZeroLengthFileException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashNotLoggedInException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashWrongOwnerException' => __DIR__ . '/includes/upload/UploadStash.php',
'UploadStashZeroLengthFileException' => __DIR__ . '/includes/upload/UploadStash.php',
$result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), $modulePrefix );
}
// @todo Update exception handling here to understand current getFile exceptions
$result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), $modulePrefix );
}
// @todo Update exception handling here to understand current getFile exceptions
- } catch ( UploadStashNotAvailableException $e ) {
- $this->dieUsage( "Session not available: " . $e->getMessage(), "nosession" );
} catch ( UploadStashFileNotFoundException $e ) {
$this->dieUsage( "File not found: " . $e->getMessage(), "invalidsessiondata" );
} catch ( UploadStashBadPathException $e ) {
} catch ( UploadStashFileNotFoundException $e ) {
$this->dieUsage( "File not found: " . $e->getMessage(), "invalidsessiondata" );
} catch ( UploadStashBadPathException $e ) {
public function __construct() {
parent::__construct( 'UploadStash', 'upload' );
public function __construct() {
parent::__construct( 'UploadStash', 'upload' );
- try {
- $this->stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash( $this->getUser() );
- } catch ( UploadStashNotAvailableException $e ) {
- }
* @return bool Success
*/
public function execute( $subPage ) {
* @return bool Success
*/
public function execute( $subPage ) {
+ $this->stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash( $this->getUser() );
$this->checkPermissions();
if ( $subPage === null || $subPage === '' ) {
$this->checkPermissions();
if ( $subPage === null || $subPage === '' ) {
class UploadStashException extends MWException {
}
class UploadStashException extends MWException {
}
-class UploadStashNotAvailableException extends UploadStashException {
-}
-
class UploadStashFileNotFoundException extends UploadStashException {
}
class UploadStashFileNotFoundException extends UploadStashException {
}