r71813 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71812‎ | r71813 | r71814 >
Date:22:06, 27 August 2010
Author:kaldari
Status:ok
Tags:
Comment:
use getArray default parameter for shorter code
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -529,11 +529,7 @@
530530 $startArray['min'] . '00'
531531 ;
532532 $projectSelected = $wgRequest->getVal( 'project_name' );
533 - if ( $wgRequest->getArray( 'project_languages' ) ) {
534 - $noticeLanguages = $wgRequest->getArray( 'project_languages' );
535 - } else {
536 - $noticeLanguages = array();
537 - }
 533+ $noticeLanguages = $wgRequest->getArray( 'project_languages', array() );
538534 } else { // Defaults
539535 $startTimestamp = null;
540536 $projectSelected = '';
@@ -754,11 +750,7 @@
755751 $endArray['day'] . '000000'
756752 ;
757753 $projectSelected = $wgRequest->getVal( 'project_name' );
758 - if ( $wgRequest->getArray( 'project_languages' ) ) {
759 - $noticeLanguages = $wgRequest->getArray( 'project_languages' );
760 - } else {
761 - $noticeLanguages = array();
762 - }
 754+ $noticeLanguages = $wgRequest->getArray( 'project_languages', array() );
763755 } else { // Defaults
764756 $startTimestamp = $row->not_start;
765757 $endTimestamp = $row->not_end;

Status & tagging log