break;
case 'ipb_reason':
- $value = CommentStore::newKey( 'ipb_reason' )->getComment( $row )->text;
+ $value = CommentStore::getStore()->getComment( 'ipb_reason', $row )->text;
$formatted = Linker::formatComment( $value );
break;
}
function getQueryInfo() {
- $commentQuery = CommentStore::newKey( 'ipb_reason' )->getJoin();
+ $commentQuery = CommentStore::getStore()->getJoin( 'ipb_reason' );
+ $actorQuery = ActorMigration::newMigration()->getJoin( 'ipb_by' );
$info = [
- 'tables' => [ 'ipblocks', 'user' ] + $commentQuery['tables'],
+ 'tables' => array_merge(
+ [ 'ipblocks' ], $commentQuery['tables'], $actorQuery['tables'], [ 'user' ]
+ ),
'fields' => [
'ipb_id',
'ipb_address',
'ipb_user',
- 'ipb_by',
- 'ipb_by_text',
'by_user_name' => 'user_name',
'ipb_timestamp',
'ipb_auto',
'ipb_deleted',
'ipb_block_email',
'ipb_allow_usertalk',
- ] + $commentQuery['fields'],
+ ] + $commentQuery['fields'] + $actorQuery['fields'],
'conds' => $this->conds,
- 'join_conds' => [ 'user' => [ 'LEFT JOIN', 'user_id = ipb_by' ] ] + $commentQuery['joins']
+ 'join_conds' => [
+ 'user' => [ 'LEFT JOIN', 'user_id = ' . $actorQuery['fields']['ipb_by'] ]
+ ] + $commentQuery['joins'] + $actorQuery['joins']
];
# Filter out any expired blocks