}
$status = $currentBlock->update();
+ // TODO handle failure
$logaction = 'reblock';
if ( (bool)$currentBlock->mHideName ) {
$data['HideUser'] = true;
}
+
+ $block = $currentBlock;
}
} else {
$logaction = 'block';
$logEntry->setComment( $data['Reason'][0] );
$logEntry->setPerformer( $performer );
$logEntry->setParameters( $logParams );
- # Relate log ID to block IDs (T27763)
- $blockIds = array_merge( [ $status['id'] ], $status['autoIds'] );
- $logEntry->setRelations( [ 'ipb_id' => $blockIds ] );
+ # Relate log ID to block ID (T27763)
+ $logEntry->setRelations( [ 'ipb_id' => $block->getId() ] );
$logId = $logEntry->insert();
if ( !empty( $data['Tags'] ) ) {
if ( isset( $data['Tags'] ) ) {
$logEntry->setTags( $data['Tags'] );
}
+ $logEntry->setRelations( [ 'ipb_id' => $block->getId() ] );
$logId = $logEntry->insert();
$logEntry->publish( $logId );