Index: branches/wmf-deployment/includes/api/ApiQueryBlocks.php |
— | — | @@ -63,27 +63,29 @@ |
64 | 64 | $titles = $pageSet->getTitles(); |
65 | 65 | $data = array(); |
66 | 66 | |
67 | | - $this->addTables('ipblocks'); |
68 | | - if($fld_id) |
69 | | - $this->addFields('ipb_id'); |
70 | | - if($fld_user) |
71 | | - $this->addFields(array('ipb_address', 'ipb_user', 'ipb_auto')); |
72 | | - if($fld_by) |
| 67 | + $this->addTables( 'ipblocks' ); |
| 68 | + $this->addFields( 'ipb_auto' ); |
| 69 | + |
| 70 | + if ( $fld_id ) |
| 71 | + $this->addFields( 'ipb_id' ); |
| 72 | + if ( $fld_user ) |
| 73 | + $this->addFields( array( 'ipb_address', 'ipb_user' ) ); |
| 74 | + if ( $fld_by ) |
73 | 75 | { |
74 | 76 | $this->addTables('user'); |
75 | 77 | $this->addFields(array('ipb_by', 'user_name')); |
76 | 78 | $this->addWhere('user_id = ipb_by'); |
77 | 79 | } |
78 | | - if($fld_timestamp) |
79 | | - $this->addFields('ipb_timestamp'); |
80 | | - if($fld_expiry) |
81 | | - $this->addFields('ipb_expiry'); |
82 | | - if($fld_reason) |
83 | | - $this->addFields('ipb_reason'); |
84 | | - if($fld_range) |
85 | | - $this->addFields(array('ipb_range_start', 'ipb_range_end')); |
86 | | - if($fld_flags) |
87 | | - $this->addFields(array('ipb_auto', 'ipb_anon_only', 'ipb_create_account', 'ipb_enable_autoblock', 'ipb_block_email', 'ipb_deleted', 'ipb_allow_usertalk')); |
| 80 | + if ( $fld_timestamp ) |
| 81 | + $this->addFields( 'ipb_timestamp' ); |
| 82 | + if ( $fld_expiry ) |
| 83 | + $this->addFields( 'ipb_expiry' ); |
| 84 | + if ( $fld_reason ) |
| 85 | + $this->addFields( 'ipb_reason' ); |
| 86 | + if ( $fld_range ) |
| 87 | + $this->addFields( array( 'ipb_range_start', 'ipb_range_end' ) ); |
| 88 | + if ( $fld_flags ) |
| 89 | + $this->addFields( array( 'ipb_anon_only', 'ipb_create_account', 'ipb_enable_autoblock', 'ipb_block_email', 'ipb_deleted', 'ipb_allow_usertalk' ) ); |
88 | 90 | |
89 | 91 | $this->addOption('LIMIT', $params['limit'] + 1); |
90 | 92 | $this->addWhereRange('ipb_timestamp', $params['dir'], $params['start'], $params['end']); |