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 ) {
+ $this->stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash( $this->getUser() );
$this->checkPermissions();
if ( $subPage === null || $subPage === '' ) {
*/
private function outputRemoteScaledThumb( $file, $params, $flags ) {
// This option probably looks something like
- // 'http://upload.wikimedia.org/wikipedia/test/thumb/temp'. Do not use
+ // '//upload.wikimedia.org/wikipedia/test/thumb/temp'. Do not use
// trailing slash.
$scalerBaseUrl = $this->getConfig()->get( 'UploadStashScalerBaseUrl' );
// make a curl call to the scaler to create a thumbnail
$httpOptions = array(
'method' => 'GET',
- 'timeout' => 'default'
+ 'timeout' => 5 // T90599 attempt to time out cleanly
);
$req = MWHttpRequest::factory( $scalerThumbUrl, $httpOptions, __METHOD__ );
$status = $req->execute();