try {
$this->stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash();
} catch ( UploadStashNotAvailableException $e ) {
- return null;
}
}
public function execute( $subPage ) {
if ( !$this->userCanExecute( $this->getUser() ) ) {
$this->displayRestrictionError();
- return;
+ return false;
}
if ( $subPage === null || $subPage === '' ) {
return $this->showUploads();
- } else {
- return $this->showUpload( $subPage );
}
+ return $this->showUpload( $subPage );
}
-
/**
* If file available in stash, cats it out to the client as a simple HTTP response.
* n.b. Most sanity checking done in UploadStashLocalFile, so this is straightforward.
// do not use trailing slash
global $wgUploadStashScalerBaseUrl;
$scalerBaseUrl = $wgUploadStashScalerBaseUrl;
-
+
if( preg_match( '/^\/\//', $scalerBaseUrl ) ) {
// this is apparently a protocol-relative URL, which makes no sense in this context,
// since this is used for communication that's internal to the application.