* Upload stashed in a previous request
*/
// Check the session key
- if ( !isset( $_SESSION[UploadBase::getSessionKey()][$this->mParams['sessionkey']] ) ) {
+ if ( !isset( $_SESSION[$this->mUpload->getSessionKey()][$this->mParams['sessionkey']] ) ) {
$this->dieUsageMsg( array( 'invalid-session-key' ) );
}
$this->mUpload = new UploadFromStash();
$this->mUpload->initialize( $this->mParams['filename'],
$this->mParams['sessionkey'],
- $_SESSION[UploadBase::getSessionKey()][$this->mParams['sessionkey']] );
+ $_SESSION[$this->mUpload->getSessionKey()][$this->mParams['sessionkey']] );
} elseif ( isset( $this->mParams['filename'] ) ) {
/**
* Upload from URL, etc.
*/
class LocalInstallerResource extends InstallerResource {
function LocalInstallerResource( $path ) {
- InstallerResource::InstallerResource( $path, is_dir( $path ), true );
+ parent::InstallerResource( $path, is_dir( $path ), true );
}
function fetch( $target ) {
- if ( $this->isdir ) return ExtensionInstaller::copyDir( $this->path, dirname( $target ) );
+ if ( $this->isdir ) {
+ return ExtensionInstaller::copyDir( $this->path, dirname( $target ) );
+ }
else return $this->extract( $this->path, dirname( $target ) );
}
*/
class WebInstallerResource extends InstallerResource {
function WebInstallerResource( $path ) {
- InstallerResource::InstallerResource( $path, false, false );
+ parent::InstallerResource( $path, false, false );
}
function fetch( $target ) {
*/
class SVNInstallerResource extends InstallerResource {
function SVNInstallerResource( $path ) {
- InstallerResource::InstallerResource( $path, true, false );
+ parent::InstallerResource( $path, true, false );
}
function fetch( $target ) {
var $tasks;
function ExtensionInstaller( $name, $source, $target ) {
- if ( !is_object( $source ) ) $source = InstallerResource::makeResource( $source );
+ if ( !is_object( $source ) ) {
+ $source = parent::makeResource( $source );
+ }
$this->name = $name;
$this->source = $source;
$job = Job::pop();
$this->assertFalse( $job );
- self::deleteFile( 'Test.png' );
+ $this->deleteFile( 'Test.png' );
$wgUser->addGroup( 'users' );
$data = $this->doApiRequest( array(
$this->assertTrue( $t->exists() );
- self::deleteFile( 'Test.png' );
+ $this->deleteFile( 'Test.png' );
}
/**