diff --git a/src/ReplaceTextSearch.php b/src/ReplaceTextSearch.php index c59bdd54..ac18e54e 100644 --- a/src/ReplaceTextSearch.php +++ b/src/ReplaceTextSearch.php @@ -1,7 +1,6 @@ getType() == 'postgres' ) { $op = '~'; } else { $op = 'REGEXP'; diff --git a/src/SpecialReplaceText.php b/src/SpecialReplaceText.php index b502f7df..273872d0 100644 --- a/src/SpecialReplaceText.php +++ b/src/SpecialReplaceText.php @@ -427,7 +427,7 @@ class SpecialReplaceText extends SpecialPage { // SQLite unfortunately lacks a REGEXP function or operator by // default, so disable regex(p) searches for SQLite. $dbr = wfGetDB( DB_REPLICA ); - if ( ! $dbr instanceof Wikimedia\Rdbms\DatabaseSqlite ) { + if ( $dbr->getType() != 'sqlite' ) { $out->addHTML( Xml::tags( 'p', null, Xml::checkLabel( $this->msg( 'replacetext_useregex' )->text(),