1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-22 10:57:56 +01:00

Merge branch '3.1.x' into 3.2.x

This commit is contained in:
Marc Alexander 2016-09-17 00:05:09 +02:00
commit 2dbc9e1016
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -1261,7 +1261,7 @@ class fulltext_native extends \phpbb\search\base
if (!$total_results && $is_mysql)
{
// Count rows for the executed queries. Replace $select within $sql with SQL_CALC_FOUND_ROWS, and run it.
$sql_calc = str_replace('SELECT ' . $select, 'SELECT DISTINCT SQL_CALC_FOUND_ROWS ' . $select, $sql);
$sql_calc = str_replace('SELECT ' . $select, 'SELECT SQL_CALC_FOUND_ROWS ' . $select, $sql);
$result = $this->db->sql_query($sql_calc);
$this->db->sql_freeresult($result);