r86747 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86746‎ | r86747 | r86748 >
Date:03:10, 23 April 2011
Author:dantman
Status:ok
Tags:
Comment:
Allow rows missing iw_trans or iw_local to be considered valid.
Modified paths:
  • /trunk/phase3/includes/interwiki/Interwiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/interwiki/Interwiki.php
@@ -185,11 +185,11 @@
186186 * @return Boolean: whether everything was there
187187 */
188188 protected static function loadFromArray( $mc ) {
189 - if( isset( $mc['iw_url'] ) && isset( $mc['iw_local'] ) && isset( $mc['iw_trans'] ) ) {
 189+ if( isset( $mc['iw_url'] ) ) {
190190 $iw = new Interwiki();
191191 $iw->mURL = $mc['iw_url'];
192 - $iw->mLocal = $mc['iw_local'];
193 - $iw->mTrans = $mc['iw_trans'];
 192+ $iw->mLocal = isset( $mc['iw_local'] ) ? $mc['iw_local'] : 0;
 193+ $iw->mTrans = isset( $mc['iw_trans'] ) ? $mc['iw_trans'] : 0;
194194 $iw->mAPI = isset( $mc['iw_api'] ) ? $mc['iw_api'] : '';
195195 $iw->mWikiID = isset( $mc['iw_wikiid'] ) ? $mc['iw_wikiid'] : '';
196196

Status & tagging log