38 private function addBlockInfoToQuery( $showBlockInfo ) {
41 if ( $showBlockInfo ) {
42 $queryInfo = DatabaseBlock::getQueryInfo();
45 'tables' => [
'ipblocks' ],
46 'fields' => [
'ipb_deleted' ],
51 $this->
addTables( [
'blk' => $queryInfo[
'tables'] ] );
55 'blk' => [
'LEFT JOIN', [
57 'ipb_expiry > ' . $db->addQuotes( $db->timestamp() ),
63 $this->
addWhere(
'ipb_deleted = 0 OR ipb_deleted IS NULL' );
75 abstract protected function getDB();
88 abstract protected function addTables( $tables, $alias =
null );
addTables( $tables, $alias=null)
trait ApiQueryBlockInfoTrait