summaryrefslogtreecommitdiff
path: root/includes/SearchTsearch2.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/SearchTsearch2.php')
-rw-r--r--includes/SearchTsearch2.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/SearchTsearch2.php b/includes/SearchTsearch2.php
index a8f354b3..1fca9899 100644
--- a/includes/SearchTsearch2.php
+++ b/includes/SearchTsearch2.php
@@ -47,6 +47,7 @@ class SearchTsearch2 extends SearchEngine {
$this->searchTerms = array();
# FIXME: This doesn't handle parenthetical expressions.
+ $m = array();
if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
$filteredText, $m, PREG_SET_ORDER ) ) {
foreach( $m as $terms ) {
@@ -64,7 +65,7 @@ class SearchTsearch2 extends SearchEngine {
$this->searchTerms[] = $regexp;
}
wfDebug( "Would search with '$searchon'\n" );
- wfDebug( "Match with /\b" . implode( '\b|\b', $this->searchTerms ) . "\b/\n" );
+ wfDebug( 'Match with /\b' . implode( '\b|\b', $this->searchTerms ) . "\b/\n" );
} else {
wfDebug( "Can't understand search query '{$this->filteredText}'\n" );
}
@@ -112,7 +113,7 @@ class SearchTsearch2 extends SearchEngine {
$dbw=& wfGetDB(DB_MASTER);
$searchindex = $dbw->tableName( 'searchindex' );
$sql = "UPDATE $searchindex SET si_title=to_tsvector('" .
- $db->strencode( $title ) .
+ $dbw->strencode( $title ) .
"') WHERE si_page={$id}";
$dbw->query( $sql, "SearchMySQL4::updateTitle" );