r62340 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62339‎ | r62340 | r62341 >
Date:23:09, 11 February 2010
Author:reedy
Status:ok
Tags:
Comment:
Simplification as per Bryan on r62339 comment
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiBase.php
@@ -973,15 +973,16 @@
974974 $ret = array();
975975
976976 if ( $this->mustBePosted() ) {
977 - $ret = array_merge( $ret, array( array ( 'mustbeposted', $this->getModuleName() ) ) );
 977+ $ret[] = array ( 'mustbeposted', $this->getModuleName() );
978978 }
979979
980980 if ( $this->isReadMode() ) {
981 - $ret = array_merge( $ret, array( array ( 'readrequired' ) ) );
 981+ $ret[] = array ( 'readrequired' );
982982 }
983983
984984 if ( $this->isWriteMode() ) {
985 - $ret = array_merge( $ret, array( array ( 'writerequired' ), array( 'writedisabled' ) ) );
 985+ $ret[] = array ( 'writerequired' );
 986+ $ret[] = array ( 'writedisabled' );
986987 }
987988
988989 return $ret;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62339Cater for some more errors in ApiBase.phpreedy22:28, 11 February 2010

Status & tagging log