X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fapi%2FApiQueryBlocks.php;h=96b8696240229f4a4b28035385f83b487003591b;hb=67e23ec357d2265bc487bdd4b63e30fcaf5871c7;hp=097487e397015ef6ebbc68d47c4727e5045e675d;hpb=8a1cb5b3483a929f2fde61cbb73dd7d19d07a777;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index 097487e397..96b8696240 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -299,8 +299,8 @@ class ApiQueryBlocks extends ApiQueryBase { 'start' => 'The timestamp to start enumerating from', 'end' => 'The timestamp to stop enumerating at', 'dir' => $this->getDirectionDescription( $p ), - 'ids' => 'Pipe-separated list of block IDs to list (optional)', - 'users' => 'Pipe-separated list of users to search for (optional)', + 'ids' => 'List of block IDs to list (optional)', + 'users' => 'List of users to search for (optional)', 'ip' => array( 'Get all blocks applying to this IP or CIDR range, including range blocks.', 'Cannot be used together with bkusers. CIDR ranges broader than /16 are not accepted' ), 'limit' => 'The maximum amount of blocks to list', @@ -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() {