+ $hideTemp = in_array( 'tempblocks', $this->options );
+ $hideIndef = in_array( 'indefblocks', $this->options );
+ if ( $hideTemp && $hideIndef ) {
+ // If both types are hidden, ensure query doesn't produce any results
+ $conds[] = '1=0';
+ } elseif ( $hideTemp ) {
+ $conds['ipb_expiry'] = $db->getInfinity();
+ } elseif ( $hideIndef ) {
+ $conds[] = "ipb_expiry != " . $db->addQuotes( $db->getInfinity() );
+ }
+
+ if ( $this->blockType === 'sitewide' ) {
+ $conds['ipb_sitewide'] = 1;
+ } elseif ( $this->blockType === 'partial' ) {
+ $conds['ipb_sitewide'] = 0;
+ }
+