From: umherirrender Date: Sat, 4 Aug 2012 14:35:49 +0000 (+0200) Subject: fix list of possible errors for list=blocks X-Git-Tag: 1.31.0-rc.0~22849 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=9b64000d1e4b0696be5d6fe257e00cec4306241c;p=lhc%2Fweb%2Fwiklou.git fix list of possible errors for list=blocks Change-Id: I4a091eeb788f465fe6cdbb7fe6d296606185ba3c --- diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index d88e4da45e..96b8696240 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -383,13 +383,15 @@ class ApiQueryBlocks extends ApiQueryBase { } public function getPossibleErrors() { - return array_merge( parent::getPossibleErrors(), array( + return array_merge( parent::getPossibleErrors(), $this->getRequireOnlyOneParameterErrorMessages( array( 'users', 'ip' ) ), - array( 'code' => 'cidrtoobroad', 'info' => 'CIDR ranges broader than /16 are not accepted' ), - array( 'code' => 'param_user', 'info' => 'User parameter may not be empty' ), - array( 'code' => 'param_user', 'info' => 'User name user is not valid' ), - array( 'show' ), - ) ); + array( + array( 'code' => 'cidrtoobroad', 'info' => 'CIDR ranges broader than /16 are not accepted' ), + array( 'code' => 'param_user', 'info' => 'User parameter may not be empty' ), + array( 'code' => 'param_user', 'info' => 'User name user is not valid' ), + array( 'show' ), + ) + ); } public function getExamples() {