From 050e1c73808c7e1a7c4d95ba5737b08020c34430 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 21 Jul 2008 21:37:11 +0000 Subject: [PATCH] Cleanup from r37839: just put ipb_auto in the relevant arrays. We have those arrays so we don't have to add if($fld_a || $fld_b) for every crazy flag combination in existence. --- includes/api/ApiQueryBlocks.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index f509d938ec..9d9a5d75a0 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -71,9 +71,7 @@ class ApiQueryBlocks extends ApiQueryBase { if($fld_id) $this->addFields('ipb_id'); if($fld_user) - $this->addFields(array('ipb_address', 'ipb_user')); - if($fld_user || $fld_flags) - $this->addFields('ipb_auto'); + $this->addFields(array('ipb_address', 'ipb_user', 'ipb_auto')); if($fld_by) { $this->addTables('user'); @@ -89,7 +87,7 @@ class ApiQueryBlocks extends ApiQueryBase { if($fld_range) $this->addFields(array('ipb_range_start', 'ipb_range_end')); if($fld_flags) - $this->addFields(array('ipb_anon_only', 'ipb_create_account', 'ipb_enable_autoblock', 'ipb_block_email', 'ipb_deleted')); + $this->addFields(array('ipb_auto', 'ipb_anon_only', 'ipb_create_account', 'ipb_enable_autoblock', 'ipb_block_email', 'ipb_deleted')); $this->addOption('LIMIT', $params['limit'] + 1); $this->addWhereRange('ipb_timestamp', $params['dir'], $params['start'], $params['end']); -- 2.20.1