r81150 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81149‎ | r81150 | r81151 >
Date:19:20, 28 January 2011
Author:ariel
Status:ok (Comments)
Tags:
Comment:
open a series of files for xml input, if supplied (used for multiple xml prefetch files)
Modified paths:
  • /trunk/phase3/maintenance/dumpTextPass.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dumpTextPass.php
@@ -95,18 +95,28 @@
9696 }
9797
9898 function processFileOpt( $val, $param ) {
99 - switch( $val ) {
100 - case "file":
101 - return $param;
102 - case "gzip":
103 - return "compress.zlib://$param";
104 - case "bzip2":
105 - return "compress.bzip2://$param";
106 - case "7zip":
107 - return "mediawiki.compress.7z://$param";
108 - default:
109 - return $val;
 99+ $fileURIs = explode(';',$param);
 100+ foreach ( $fileURIs as $URI ) {
 101+ switch( $val ) {
 102+ case "file":
 103+ $newURI = $URI;
 104+ break;
 105+ case "gzip":
 106+ $newURI = "compress.zlib://$URI";
 107+ break;
 108+ case "bzip2":
 109+ $newURI = "compress.bzip2://$URI";
 110+ break;
 111+ case "7zip":
 112+ $newURI = "mediawiki.compress.7z://$URI";
 113+ break;
 114+ default:
 115+ $newURI = $URI;
 116+ }
 117+ $newFileURIs[] = $newURI;
110118 }
 119+ $val = implode( ';', $newFileURIs );
 120+ return $val;
111121 }
112122
113123 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r814021.17: MFT r79915, r79957, r79964, r79990, r80687, r80999, r81006, r81011, r81...catrope16:18, 2 February 2011

Comments

#Comment by Reedy (talk | contribs)   16:49, 31 January 2011

Minor style issues. Could also have the case "file": at the end, to fall through to the default (or just comment it out to leave it for references). Doesn't matter a great deal though

Status & tagging log