r96648 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96647‎ | r96648 | r96649 >
Date:07:28, 9 September 2011
Author:ariel
Status:ok (Comments)
Tags:
Comment:
getFilename renamed to getFilenames since it can return a list
Modified paths:
  • /trunk/phase3/includes/Export.php (modified) (history)
  • /trunk/phase3/maintenance/dumpTextPass.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dumpTextPass.php
@@ -246,7 +246,7 @@
247247 }
248248
249249 if ( $this->checkpointFiles ) {
250 - $filenameList = (array)$this->egress->getFilename();
 250+ $filenameList = (array)$this->egress->getFilenames();
251251 if ( count( $filenameList ) != count( $this->checkpointFiles ) ) {
252252 throw new MWException("One checkpointfile must be specified for each output option, if maxtime is used.\n");
253253 }
@@ -282,7 +282,7 @@
283283 $offset += strlen( $chunk );
284284 } while ( $chunk !== false && !feof( $input ) );
285285 if ($this->maxTimeAllowed) {
286 - $filenameList = (array)$this->egress->getFilename();
 286+ $filenameList = (array)$this->egress->getFilenames();
287287 // we wrote some stuff after last checkpoint that needs renamed
288288 if (file_exists($filenameList[0])) {
289289 $newFilenames = array();
@@ -571,7 +571,7 @@
572572 $this->thisPage = "";
573573 // this could be more than one file if we had more than one output arg
574574 $checkpointFilenames = array();
575 - $filenameList = (array)$this->egress->getFilename();
 575+ $filenameList = (array)$this->egress->getFilenames();
576576 $newFilenames = array();
577577 $firstPageID = str_pad($this->firstPageWritten,9,"0",STR_PAD_LEFT);
578578 $lastPageID = str_pad($this->lastPageWritten,9,"0",STR_PAD_LEFT);
Index: trunk/phase3/includes/Export.php
@@ -724,7 +724,7 @@
725725 * Returns the name of the file or files which are
726726 * being written to, if there are any.
727727 */
728 - function getFilename() {
 728+ function getFilenames() {
729729 return NULL;
730730 }
731731 }
@@ -766,7 +766,7 @@
767767 }
768768 }
769769
770 - function getFilename() {
 770+ function getFilenames() {
771771 return $this->filename;
772772 }
773773 }
@@ -938,8 +938,8 @@
939939 $this->sink->closeAndRename( $newname, $open );
940940 }
941941
942 - function getFilename() {
943 - return $this->sink->getFilename();
 942+ function getFilenames() {
 943+ return $this->sink->getFilenames();
944944 }
945945
946946 /**
@@ -1100,10 +1100,10 @@
11011101 }
11021102 }
11031103
1104 - function getFilename() {
 1104+ function getFilenames() {
11051105 $filenames = array();
11061106 for ( $i = 0; $i < $this->count; $i++ ) {
1107 - $filenames[] = $this->sinks[$i]->getFilename();
 1107+ $filenames[] = $this->sinks[$i]->getFilenames();
11081108 }
11091109 return $filenames;
11101110 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r103041REL1_18 MFT r96616, r97889...reedy21:43, 14 November 2011
r1030431.18wmf1 MFT r103041...reedy21:46, 14 November 2011

Comments

#Comment by Nikerabbit (talk | contribs)   07:57, 9 September 2011

Did you check for callers in extensions?

#Comment by ArielGlenn (talk | contribs)   10:20, 9 September 2011

Yes. (Although it's a new function that just squeaked by with an "OK" a few days ago. Someone would have to be quick on the uptake to have already included it someplace.)

Status & tagging log