r30127 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30126‎ | r30127 | r30128 >
Date:17:41, 24 January 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Content-Disposition header for po export
Modified paths:
  • /trunk/extensions/Translate/README (modified) (history)
  • /trunk/extensions/Translate/TranslateTasks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateTasks.php
@@ -375,13 +375,17 @@
376376 public function output() {
377377 global $IP, $wgServer, $wgTranslateDocumentationLanguageCode;
378378
 379+
379380 $lang = Language::factory( 'en' );
380381
381382 $out = '';
382383 $now = wfTimestampNow();
383384 $label = $this->messageGroup->getLabel();
384 - $languageName = TranslateUtils::getLanguageName( $this->options->getLanguage() );
 385+ $code = $this->options->getLanguage();
 386+ $languageName = TranslateUtils::getLanguageName( $code );
385387
 388+ $filename = $code . '_' . $this->messageGroup->getID() . '.po';
 389+ header( "Content-Disposition: attachment; filename=\"$filename\"" );
386390
387391 $headers = array();
388392 $headers['Project-Id-Version'] = 'MediaWiki ' . SpecialVersion::getVersion();
Index: trunk/extensions/Translate/README
@@ -55,6 +55,7 @@
5656 * Experimental support for some extensions in export.php
5757 * export.php can now export most supported groups
5858 * autoexport.php helper
 59+* Content-Disposition header for po export
5960
6061 == Changes in version 7 ==
6162 * Released 2007-12-29

Status & tagging log