Skip to content

Commit

Permalink
(postgres) Replace RLIKE when PostgreSQL is used
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardspec committed Dec 30, 2024
1 parent fd0f566 commit 377875a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/FindEventPagesQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ public function setTitleRegex( $regex ) {
return;
}

$this->where[] = 'page_title RLIKE ' . $this->dbr->addQuotes( $regex );
$rlike = $this->dbr->getType() === 'postgres' ? '~' : 'RLIKE';
$this->where[] = "page_title $rlike " . $this->dbr->addQuotes( $regex );
}

/**
Expand Down

0 comments on commit 377875a

Please sign in to comment.