* Whether fulltext search is supported by current schema
* @return bool
*/
- function fulltextSearchSupported() {
+ private function fulltextSearchSupported() {
+ // Avoid getConnectionRef() in order to get DatabaseSqlite specifically
/** @var DatabaseSqlite $dbr */
$dbr = $this->lb->getConnection( DB_REPLICA );
-
- return $dbr->checkForEnabledSearch();
+ try {
+ return $dbr->checkForEnabledSearch();
+ } finally {
+ $this->lb->reuseConnection( $dbr );
+ }
}
/**
* @param string $title
* @param string $text
*/
- function update( $id, $title, $text ) {
+ public function update( $id, $title, $text ) {
if ( !$this->fulltextSearchSupported() ) {
return;
}
* @param int $id
* @param string $title
*/
- function updateTitle( $id, $title ) {
+ public function updateTitle( $id, $title ) {
if ( !$this->fulltextSearchSupported() ) {
return;
}