From: Roan Kattouw Date: Mon, 21 Jul 2008 21:37:11 +0000 (+0000) Subject: Cleanup from r37839: just put ipb_auto in the relevant arrays. We have those arrays... X-Git-Tag: 1.31.0-rc.0~46425 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=050e1c73808c7e1a7c4d95ba5737b08020c34430;p=lhc%2Fweb%2Fwiklou.git 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. --- 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']);