getFilename renamed to getFilenames since it can return a list

This commit is contained in:
Ariel Glenn 2011-09-09 07:28:11 +00:00
parent 109636020d
commit be36f6e1fe
2 changed files with 9 additions and 9 deletions

View 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;
}

View 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);