From be36f6e1fea71ba89cb2af222d58eebdd8a6866f Mon Sep 17 00:00:00 2001 From: Ariel Glenn Date: Fri, 9 Sep 2011 07:28:11 +0000 Subject: [PATCH] getFilename renamed to getFilenames since it can return a list --- includes/Export.php | 12 ++++++------ maintenance/dumpTextPass.php | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index e6058b54b4..ac28a54163 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -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; } diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index 29b421d504..9ca6d74ccc 100644 --- a/maintenance/dumpTextPass.php +++ b/maintenance/dumpTextPass.php @@ -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); -- 2.20.1