From: Sam Reed Date: Thu, 11 Feb 2010 23:09:38 +0000 (+0000) Subject: Simplification as per Bryan on r62339 comment X-Git-Tag: 1.31.0-rc.0~37806 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=bd7da13869d3b1b21cf9ab5084523ac582f7fddf;p=lhc%2Fweb%2Fwiklou.git Simplification as per Bryan on r62339 comment --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index cd30412c72..7bd9216899 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -973,15 +973,16 @@ abstract class ApiBase { $ret = array(); if ( $this->mustBePosted() ) { - $ret = array_merge( $ret, array( array ( 'mustbeposted', $this->getModuleName() ) ) ); + $ret[] = array ( 'mustbeposted', $this->getModuleName() ); } if ( $this->isReadMode() ) { - $ret = array_merge( $ret, array( array ( 'readrequired' ) ) ); + $ret[] = array ( 'readrequired' ); } if ( $this->isWriteMode() ) { - $ret = array_merge( $ret, array( array ( 'writerequired' ), array( 'writedisabled' ) ) ); + $ret[] = array ( 'writerequired' ); + $ret[] = array ( 'writedisabled' ); } return $ret;