r83549 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83548‎ | r83549 | r83550 >
Date:22:03, 8 March 2011
Author:siebrand
Status:deferred
Tags:
Comment:
Create export directory. Otherwise the file cannot be written.
Modified paths:
  • /trunk/extensions/Translate/FFS.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/FFS.php
@@ -1072,10 +1072,13 @@
10731073 if( !isset( $this->data[$code] ) ) $this->data[$code] = array();
10741074 return array( 'MESSAGES' => $this->data[$code] );
10751075 }
1076 -
10771076
 1077+
10781078 public function write( MessageCollection $collection ) {
10791079 if( $this->fw === null ) {
 1080+ $outputFile = $this->writePath . '/' . $this->group->getTargetFilename( 'en' );
 1081+ wfMkdirParents( dirname( $outputFile ), null, __METHOD__ );
 1082+ $this->fw = fopen( $outputFile, 'w' );
10801083 $this->fw = fopen( $this->writePath . '/' . $this->group->getTargetFilename( 'en' ), 'w' );
10811084 fwrite( $this->fw, "# -*- coding: utf-8 -*-\nmsg = {\n" );
10821085 }

Status & tagging log