Merge "Guard dereference of iwPrefix['iw_trans'] and iwPrefix['iw_local']"

This commit is contained in:
jenkins-bot 2014-12-16 23:16:42 +00:00 committed by Gerrit Code Review
commit 0172c444e3

View file

@ -38,7 +38,7 @@ class SpecialInterwiki extends SpecialPage {
$action = $par ? $par : $request->getVal( 'action', $par );
$return = $this->getPageTitle();
switch( $action ) {
switch ( $action ) {
case 'delete':
case 'edit':
case 'add':
@ -231,7 +231,7 @@ class SpecialInterwiki extends SpecialPage {
$reason = $request->getText( 'wpInterwikiReason' );
$selfTitle = $this->getPageTitle();
$dbw = wfGetDB( DB_MASTER );
switch( $do ) {
switch ( $do ) {
case 'delete':
$dbw->delete( 'interwiki', array( 'iw_prefix' => $prefix ), __METHOD__ );
@ -442,7 +442,7 @@ class SpecialInterwiki extends SpecialPage {
);
$attribs = array( 'class' => 'mw-interwikitable-local' );
// Green background for cells with "yes".
if( $iwPrefix['iw_local'] ) {
if ( isset( $iwPrefix['iw_local'] ) && $iwPrefix['iw_local'] ) {
$attribs['class'] .= ' mw-interwikitable-local-yes';
}
// The messages interwiki_0 and interwiki_1 are used here.
@ -452,7 +452,7 @@ class SpecialInterwiki extends SpecialPage {
$out .= Html::element( 'td', $attribs, $contents );
$attribs = array( 'class' => 'mw-interwikitable-trans' );
// Green background for cells with "yes".
if( $iwPrefix['iw_trans'] ) {
if ( isset( $iwPrefix['iw_trans'] ) && $iwPrefix['iw_trans'] ) {
$attribs['class'] .= ' mw-interwikitable-trans-yes';
}
// The messages interwiki_0 and interwiki_1 are used here.