return [];
}
- $db = $db ?: $this->loadBalancer->getConnection( DB_REPLICA );
+ $db = $db ?: $this->loadBalancer->getConnectionRef( DB_REPLICA );
$result = $db->select(
[ 'ipblocks_restrictions', 'page' ],
return false;
}
- $dbw = $this->loadBalancer->getConnection( DB_MASTER );
+ $dbw = $this->loadBalancer->getConnectionRef( DB_MASTER );
$dbw->insert(
'ipblocks_restrictions',
* @return bool
*/
public function update( array $restrictions ) {
- $dbw = $this->loadBalancer->getConnection( DB_MASTER );
+ $dbw = $this->loadBalancer->getConnectionRef( DB_MASTER );
$dbw->startAtomic( __METHOD__ );
$parentBlockId = (int)$parentBlockId;
- $db = $this->loadBalancer->getConnection( DB_MASTER );
+ $db = $this->loadBalancer->getConnectionRef( DB_MASTER );
$db->startAtomic( __METHOD__ );
* @return bool
*/
public function delete( array $restrictions ) {
- $dbw = $this->loadBalancer->getConnection( DB_MASTER );
+ $dbw = $this->loadBalancer->getConnectionRef( DB_MASTER );
$result = true;
foreach ( $restrictions as $restriction ) {
if ( !$restriction instanceof Restriction ) {
* @return bool
*/
public function deleteByBlockId( $blockId ) {
- $dbw = $this->loadBalancer->getConnection( DB_MASTER );
+ $dbw = $this->loadBalancer->getConnectionRef( DB_MASTER );
return $dbw->delete(
'ipblocks_restrictions',
[ 'ir_ipb_id' => $blockId ],
* @return bool
*/
public function deleteByParentBlockId( $parentBlockId ) {
- $dbw = $this->loadBalancer->getConnection( DB_MASTER );
+ $dbw = $this->loadBalancer->getConnectionRef( DB_MASTER );
return $dbw->deleteJoin(
'ipblocks_restrictions',
'ipblocks',