summaryrefslogtreecommitdiff
path: root/includes/SearchOracle.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-02-22 13:37:51 +0100
committerPierre Schmitz <pierre@archlinux.de>2009-02-22 13:37:51 +0100
commitb9b85843572bf283f48285001e276ba7e61b63f6 (patch)
tree4c6f4571552ada9ccfb4030481dcf77308f8b254 /includes/SearchOracle.php
parentd9a20acc4e789cca747ad360d87ee3f3e7aa58c1 (diff)
updated to MediaWiki 1.14.0
Diffstat (limited to 'includes/SearchOracle.php')
-rw-r--r--includes/SearchOracle.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/includes/SearchOracle.php b/includes/SearchOracle.php
index bf9368d1..b48d5e6e 100644
--- a/includes/SearchOracle.php
+++ b/includes/SearchOracle.php
@@ -77,9 +77,10 @@ class SearchOracle extends SearchEngine {
function queryNamespaces() {
if( is_null($this->namespaces) )
return '';
- $namespaces = implode(',', $this->namespaces);
- if ($namespaces == '') {
+ if ( !count( $this->namespaces ) ) {
$namespaces = '0';
+ } else {
+ $namespaces = $this->db->makeList( $this->namespaces );
}
return 'AND page_namespace IN (' . $namespaces . ')';
}
@@ -144,7 +145,10 @@ class SearchOracle extends SearchEngine {
'WHERE page_id=si_page AND ' . $match;
}
- /** @todo document */
+ /**
+ * Parse a user input search string, and return an SQL fragment to be used
+ * as part of a WHERE clause
+ */
function parseQuery($filteredText, $fulltext) {
global $wgContLang;
$lc = SearchEngine::legalSearchChars();
@@ -170,9 +174,9 @@ class SearchOracle extends SearchEngine {
}
}
- $searchon = $this->db->strencode(join(',', $q));
+ $searchon = $this->db->addQuotes(join(',', $q));
$field = $this->getIndexField($fulltext);
- return " CONTAINS($field, '$searchon', 1) > 0 ";
+ return " CONTAINS($field, $searchon, 1) > 0 ";
}
/**