getFilename renamed to getFilenames since it can return a list
authorAriel Glenn <ariel@users.mediawiki.org>
Fri, 9 Sep 2011 07:28:11 +0000 (07:28 +0000)
committerAriel Glenn <ariel@users.mediawiki.org>
Fri, 9 Sep 2011 07:28:11 +0000 (07:28 +0000)
includes/Export.php
maintenance/dumpTextPass.php

index e6058b5..ac28a54 100644 (file)
@@ -724,7 +724,7 @@ class DumpOutput {
         * Returns the name of the file or files which are
         * being written to, if there are any.
         */
-       function getFilename() {
+       function getFilenames() {
                return NULL;
        }
 }
@@ -766,7 +766,7 @@ class DumpFileOutput extends DumpOutput {
                }
        }
 
-       function getFilename() {
+       function getFilenames() {
                return $this->filename;
        }
 }
@@ -938,8 +938,8 @@ class DumpFilter {
                $this->sink->closeAndRename( $newname, $open );
        }
 
-       function getFilename() {
-               return $this->sink->getFilename();
+       function getFilenames() {
+               return $this->sink->getFilenames();
        }
 
        /**
@@ -1100,10 +1100,10 @@ class DumpMultiWriter {
                }
        }
 
-       function getFilename() {
+       function getFilenames() {
                $filenames = array();
                for ( $i = 0; $i < $this->count; $i++ ) {
-                       $filenames[] =  $this->sinks[$i]->getFilename();
+                       $filenames[] =  $this->sinks[$i]->getFilenames();
                }
                return $filenames;
        }
index 29b421d..9ca6d74 100644 (file)
@@ -246,7 +246,7 @@ class TextPassDumper extends BackupDumper {
                }
 
                if ( $this->checkpointFiles ) {
-                       $filenameList = (array)$this->egress->getFilename();
+                       $filenameList = (array)$this->egress->getFilenames();
                        if ( count( $filenameList ) != count( $this->checkpointFiles ) ) {
                                throw new MWException("One checkpointfile must be specified for each output option, if maxtime is used.\n");
                        }
@@ -282,7 +282,7 @@ class TextPassDumper extends BackupDumper {
                        $offset += strlen( $chunk );
                } while ( $chunk !== false && !feof( $input ) );
                if ($this->maxTimeAllowed) {
-                       $filenameList = (array)$this->egress->getFilename();
+                       $filenameList = (array)$this->egress->getFilenames();
                        // we wrote some stuff after last checkpoint that needs renamed
                        if (file_exists($filenameList[0])) {
                                $newFilenames = array();
@@ -571,7 +571,7 @@ class TextPassDumper extends BackupDumper {
                                $this->thisPage = "";
                                // this could be more than one file if we had more than one output arg
                                $checkpointFilenames = array();
-                               $filenameList = (array)$this->egress->getFilename();
+                               $filenameList = (array)$this->egress->getFilenames();
                                $newFilenames = array();
                                $firstPageID = str_pad($this->firstPageWritten,9,"0",STR_PAD_LEFT);
                                $lastPageID = str_pad($this->lastPageWritten,9,"0",STR_PAD_LEFT);