Fixup some more wrong static usages
authorSam Reed <reedy@users.mediawiki.org>
Sun, 25 Jul 2010 21:08:34 +0000 (21:08 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 25 Jul 2010 21:08:34 +0000 (21:08 +0000)
includes/ImagePage.php
includes/api/ApiUpload.php
maintenance/installExtension.php
maintenance/tests/UploadFromUrlTest.php

index 3c778d3..9d827ee 100644 (file)
@@ -760,7 +760,7 @@ EOT
                $this->loadFile();
                if ( !$this->img->exists() || !$this->img->isLocal() || $this->img->getRedirected() ) {
                        // Standard article deletion
-                       Article::delete();
+                       parent::delete();
                        return;
                }
                $deleter = new FileDeleteForm( $this->img );
index ca91c04..16e6420 100644 (file)
@@ -60,14 +60,14 @@ class ApiUpload extends ApiBase {
                         * 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.
index 94dcfd7..d0adff3 100644 (file)
@@ -264,11 +264,13 @@ class InstallerResource {
  */
 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 ) );
        }
         
@@ -279,7 +281,7 @@ class LocalInstallerResource extends InstallerResource {
  */
 class WebInstallerResource extends InstallerResource {
        function WebInstallerResource( $path ) {
-               InstallerResource::InstallerResource( $path, false, false );
+               parent::InstallerResource( $path, false, false );
        }
         
        function fetch( $target ) {
@@ -305,7 +307,7 @@ class WebInstallerResource extends InstallerResource {
  */
 class SVNInstallerResource extends InstallerResource {
        function SVNInstallerResource( $path ) {
-               InstallerResource::InstallerResource( $path, true, false );
+               parent::InstallerResource( $path, true, false );
        }
         
        function fetch( $target ) {
@@ -333,7 +335,9 @@ class ExtensionInstaller {
        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;
index e72137f..b1567ae 100644 (file)
@@ -180,7 +180,7 @@ class UploadFromUrlTest extends ApiTestSetup {
                $job = Job::pop();
                $this->assertFalse( $job );
 
-               self::deleteFile( 'Test.png' );
+               $this->deleteFile( 'Test.png' );
 
                $wgUser->addGroup( 'users' );
                $data = $this->doApiRequest( array(
@@ -207,7 +207,7 @@ class UploadFromUrlTest extends ApiTestSetup {
 
                $this->assertTrue( $t->exists() );
 
-               self::deleteFile( 'Test.png' );
+               $this->deleteFile( 'Test.png' );
         }
 
        /**