r30350 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30349‎ | r30350 | r30351 >
Date:15:10, 31 January 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Fix checks
Modified paths:
  • /trunk/extensions/Translate/CreateMessageIndex.php (modified) (history)
  • /trunk/extensions/Translate/export.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/CreateMessageIndex.php
@@ -17,6 +17,7 @@
1818 echo "Working with $id\n";
1919 } else {
2020 echo "Something wrong with $id... skipping\n";
 21+ continue;
2122 }
2223 foreach ( $messages as $key => $data ) {
2324 # Force all keys to lower case, because the case doesn't matter and it is
@@ -32,4 +33,4 @@
3334 unset($id); // Disconnect the previous references to this $id
3435 }
3536
36 -file_put_contents( TRANSLATE_INDEXFILE, serialize( $hugearray ) );
\ No newline at end of file
 37+file_put_contents( TRANSLATE_INDEXFILE, serialize( $hugearray ) );
Index: trunk/extensions/Translate/export.php
@@ -45,8 +45,9 @@
4646
4747 $group = MessageGroups::getGroup( $options['group'] );
4848
49 -if ( is_null( $group ) || $group->isMeta() ) {
 49+if ( !$group instanceof MessageGroup || $group->isMeta() ) {
5050 echo "Invalid group\n\n";
 51+ exit( 1 );
5152 }
5253
5354 if ( $group->canExportToFile() ) {
@@ -54,4 +55,4 @@
5556 $exporter->export( $langs, $options['target'] );
5657 } else {
5758 echo "Cannot export to file\n\n";
58 -}
\ No newline at end of file
 59+}

Status & tagging log