From: Daniel Friesen Date: Sat, 23 Apr 2011 03:10:57 +0000 (+0000) Subject: Allow rows missing iw_trans or iw_local to be considered valid. X-Git-Tag: 1.31.0-rc.0~30620 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/?a=commitdiff_plain;h=1afb94ee5c5efec21fb69f2b9f2366dfb861ea02;p=lhc%2Fweb%2Fwiklou.git Allow rows missing iw_trans or iw_local to be considered valid. --- diff --git a/includes/interwiki/Interwiki.php b/includes/interwiki/Interwiki.php index 036cbe38de..71bd9725a0 100644 --- a/includes/interwiki/Interwiki.php +++ b/includes/interwiki/Interwiki.php @@ -185,11 +185,11 @@ class Interwiki { * @return Boolean: whether everything was there */ protected static function loadFromArray( $mc ) { - if( isset( $mc['iw_url'] ) && isset( $mc['iw_local'] ) && isset( $mc['iw_trans'] ) ) { + if( isset( $mc['iw_url'] ) ) { $iw = new Interwiki(); $iw->mURL = $mc['iw_url']; - $iw->mLocal = $mc['iw_local']; - $iw->mTrans = $mc['iw_trans']; + $iw->mLocal = isset( $mc['iw_local'] ) ? $mc['iw_local'] : 0; + $iw->mTrans = isset( $mc['iw_trans'] ) ? $mc['iw_trans'] : 0; $iw->mAPI = isset( $mc['iw_api'] ) ? $mc['iw_api'] : ''; $iw->mWikiID = isset( $mc['iw_wikiid'] ) ? $mc['iw_wikiid'] : '';