r111279 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111278‎ | r111279 | r111280 >
Date:07:03, 12 February 2012
Author:siebrand
Status:resolved
Tags:
Comment:
Follow-up r111272:
* don't call method statically.
* fix undefined variable.
Modified paths:
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)
  • /trunk/extensions/Translate/scripts/export.php (modified) (history)
  • /trunk/extensions/Translate/scripts/sync-group.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/scripts/sync-group.php
@@ -49,7 +49,7 @@
5050 // will give preference to groupIds.
5151 $groupIds = isset( $options['group'] ) ? explode( ',', trim( $options['group'] ) ) : null;
5252 $groupPrefix = isset( $options['groupprefix'] ) ? $options['groupprefix'] : null;
53 -$groups = MessageGroups::getMessageGroups( $groupIds, $groupPrefix );
 53+$groups = singleton()->getGroups( $groupIds, $groupPrefix );
5454
5555 if ( !count( $groups ) ) {
5656 STDERR( "ESG2: No valid message groups identified." );
Index: trunk/extensions/Translate/scripts/export.php
@@ -92,7 +92,7 @@
9393 // will give preference to groupIds.
9494 $groupIds = isset( $options['group'] ) ? explode( ',', trim( $options['group'] ) ) : null;
9595 $groupPrefix = isset( $options['groupprefix'] ) ? $options['groupprefix'] : null;
96 -$groups = MessageGroups::getGroups( $groupIds, $groupPrefix );
 96+$groups = singleton()->getGroups( $groupIds, $groupPrefix );
9797
9898 if ( !count( $groups ) ) {
9999 STDERR( "No valid message groups identified." );
Index: trunk/extensions/Translate/MessageGroups.php
@@ -1326,7 +1326,7 @@
13271327 public function getGroups( $groups = null, $groupPrefix = null ) {
13281328 if ( count( $groups ) ) {
13291329 // Get groups and add groups to array
1330 - foreach ( $groupIds as $groupId ) {
 1330+ foreach ( $groups as $groupId ) {
13311331 $group = self::getGroup( $groupId );
13321332
13331333 if ( $group !== null ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r111280Follow-up r111279: It's a good idae to indicate a class here...siebrand07:06, 12 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111272* Move hard coded styles in MessageWebImporter to CSS....siebrand04:45, 12 February 2012

Status & tagging log