r112919 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112918‎ | r112919 | r112920 >
Date:21:02, 2 March 2012
Author:nikerabbit
Status:resolved
Tags:
Comment:
Apparently someone thinks that explode( ',', '' ) returning array( 0 => '' ) is a good idea.
Ping r112917
Modified paths:
  • /trunk/extensions/Translate/specials/SpecialTranslate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/specials/SpecialTranslate.php
@@ -140,9 +140,11 @@
141141 if ( $status !== false ) {
142142 $description = $status . $description;
143143 }
144 - $priorityLangs = array_flip( explode( ',', TranslateMetadata::get( $this->group->getId(), 'prioritylangs' ) ) );
145 - $priorityForce = TranslateMetadata::get( $this->group->getId(), 'priorityforce' );
146 - if ( count( $priorityLangs ) && !isset( $priorityLangs[$this->options['language']] ) ) {
 144+
 145+ $priorityLangs = TranslateMetadata::get( $this->group->getId(), 'prioritylangs' );
 146+ if ( $priorityLangs !== false && !isset( $priorityLangs[$this->options['language']] ) ) {
 147+ $priorityLangs = array_flip( explode( ',', $priorityLangs ) );
 148+ $priorityForce = TranslateMetadata::get( $this->group->getId(), 'priorityforce' );
147149 $priorityReason = TranslateMetadata::get( $this->group->getId(), 'priorityreason' );
148150 if ( $priorityForce === 'on' ) {
149151 // Hide table

Follow-up revisions

RevisionCommit summaryAuthorDate
r112920Third time the bunny jumps, ping r112917, r112919nikerabbit21:12, 2 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112917I break it I fix itnikerabbit20:48, 2 March 2012

Status & tagging log