diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2017-10-05 14:54:52 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2017-10-05 14:54:52 +0200 |
commit | 16159f20f668c38b60a614e3642666fb907e932f (patch) | |
tree | 839adde6f48e5471f8c12f98946a0b95be149557 | |
parent | fc3d3a83db3357f3275c72ff7b3607666c6307a3 (diff) | |
parent | 5514b1069968d451adb7eaf89278a6e1e5dc20df (diff) | |
download | forums-16159f20f668c38b60a614e3642666fb907e932f.tar forums-16159f20f668c38b60a614e3642666fb907e932f.tar.gz forums-16159f20f668c38b60a614e3642666fb907e932f.tar.bz2 forums-16159f20f668c38b60a614e3642666fb907e932f.tar.xz forums-16159f20f668c38b60a614e3642666fb907e932f.zip |
Merge branch '3.1.x' into 3.2.x
-rw-r--r-- | phpBB/phpbb/search/fulltext_sphinx.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index 89c615e087..59c3d55076 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -648,7 +648,7 @@ class fulltext_sphinx $this->sphinx->SetFilter('deleted', array(0)); $this->sphinx->SetLimits($start, (int) $per_page, SPHINX_MAX_MATCHES); - $result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes); + $result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('"', '"', $this->search_query)), $this->indexes); // Could be connection to localhost:9312 failed (errno=111, // msg=Connection refused) during rotate, retry if so @@ -656,7 +656,7 @@ class fulltext_sphinx while (!$result && (strpos($this->sphinx->GetLastError(), "errno=111,") !== false) && $retries--) { usleep(SPHINX_CONNECT_WAIT_TIME); - $result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes); + $result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('"', '"', $this->search_query)), $this->indexes); } if ($this->sphinx->GetLastError()) @@ -679,7 +679,7 @@ class fulltext_sphinx $start = floor(($result_count - 1) / $per_page) * $per_page; $this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES); - $result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes); + $result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('"', '"', $this->search_query)), $this->indexes); // Could be connection to localhost:9312 failed (errno=111, // msg=Connection refused) during rotate, retry if so @@ -687,7 +687,7 @@ class fulltext_sphinx while (!$result && (strpos($this->sphinx->GetLastError(), "errno=111,") !== false) && $retries--) { usleep(SPHINX_CONNECT_WAIT_TIME); - $result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes); + $result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('"', '"', $this->search_query)), $this->indexes); } } |