r105815 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105814‎ | r105815 | r105816 >
Date:18:51, 11 December 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix use of undefined $file

Reduce code duplication in Dump7ZipOutput
Modified paths:
  • /trunk/phase3/includes/Export.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Export.php
@@ -56,7 +56,7 @@
5757 * make additional queries to pull source data while the
5858 * main query is still running.
5959 *
60 - * @param $db Database
 60+ * @param $db DatabaseBase
6161 * @param $history Mixed: one of WikiExporter::FULL, WikiExporter::CURRENT,
6262 * WikiExporter::RANGE or WikiExporter::STABLE,
6363 * or an associative array:
@@ -682,7 +682,7 @@
683683 * canonical namespace. This skips any special-casing such as gendered
684684 * user namespaces -- which while useful, are not yet listed in the
685685 * XML <siteinfo> data so are unsafe in export.
686 - *
 686+ *
687687 * @param Title $title
688688 * @return string
689689 */
@@ -897,8 +897,6 @@
898898 * @ingroup Dump
899899 */
900900 class Dump7ZipOutput extends DumpPipeOutput {
901 - protected $filename;
902 -
903901 function __construct( $file ) {
904902 $command = $this->setup7zCommand( $file );
905903 parent::__construct( $command );
@@ -913,10 +911,6 @@
914912 return( $command );
915913 }
916914
917 - function closeRenameAndReopen( $newname ) {
918 - $this->closeAndRename( $newname, true );
919 - }
920 -
921915 function closeAndRename( $newname, $open = false ) {
922916 $newname = $this->checkRenameArgCount( $newname );
923917 if ( $newname ) {
@@ -924,7 +918,7 @@
925919 proc_close( $this->procOpenResource );
926920 $this->renameOrException( $newname );
927921 if ( $open ) {
928 - $command = $this->setup7zCommand( $file );
 922+ $command = $this->setup7zCommand( $this->filename );
929923 $this->startCommand( $command );
930924 }
931925 }

Status & tagging log