}
public static function suggestTarget( $target, array $ids ) {
- $result = wfGetDB( DB_SLAVE )->select( 'logging',
+ $result = wfGetDB( DB_REPLICA )->select( 'logging',
'log_type',
- array( 'log_id' => $ids ),
+ [ 'log_id' => $ids ],
__METHOD__,
- array( 'DISTINCT' )
+ [ 'DISTINCT' ]
);
if ( $result->numRows() == 1 ) {
// If there's only one type, the target can be set to include it.
public function doQuery( $db ) {
$ids = array_map( 'intval', $this->ids );
- return $db->select( 'logging', array(
+ return $db->select( 'logging', [
'log_id',
'log_type',
'log_action',
'log_comment',
'log_params',
'log_deleted'
- ),
- array( 'log_id' => $ids ),
+ ],
+ [ 'log_id' => $ids ],
__METHOD__,
- array( 'ORDER BY' => 'log_id DESC' )
+ [ 'ORDER BY' => 'log_id DESC' ]
);
}
}
public function getLogParams( $params ) {
- return array(
+ return [
'4::ids' => $params['ids'],
'5::ofield' => $params['oldBits'],
'6::nfield' => $params['newBits'],
- );
+ ];
}
}