Line 96 | Line 96 |
---|
* @param string $phpEx PHP file extension * @param \phpbb\auth\auth $auth Auth object * @param \phpbb\config\config $config Config object
|
* @param string $phpEx PHP file extension * @param \phpbb\auth\auth $auth Auth object * @param \phpbb\config\config $config Config object
|
* @param \phpbb\db\driver\driver_interface Database object
| * @param \phpbb\db\driver\driver_interface $db Database object
|
* @param \phpbb\user $user User object * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object */
| * @param \phpbb\user $user User object * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object */
|
Line 204 | Line 204 |
---|
}
// Filter out as above
|
}
// Filter out as above
|
$split_keywords = preg_replace("#[\"\n\r\t]+#", ' ', trim(htmlspecialchars_decode($keywords)));
| $split_keywords = preg_replace("#[\"\n\r\t]+#", ' ', trim(html_entity_decode($keywords, ENT_COMPAT)));
|
// Split words $split_keywords = preg_replace('#([^\p{L}\p{N}\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
| // Split words $split_keywords = preg_replace('#([^\p{L}\p{N}\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
|
Line 550 | Line 550 |
---|
// if the total result count is not cached yet, retrieve it from the db if (!$result_count) {
|
// if the total result count is not cached yet, retrieve it from the db if (!$result_count) {
|
$sql_count = "SELECT COUNT(*) as result_count
| $sql_count = "SELECT COUNT(DISTINCT " . (($type == 'posts') ? 'p.post_id' : 't.topic_id') . ") as result_count
|
$sql_from $sql_where"; $result = $this->db->sql_query($sql_count);
| $sql_from $sql_where"; $result = $this->db->sql_query($sql_count);
|
Line 836 | Line 836 |
---|
GROUP BY t.topic_id, $sort_by_sql[$sort_key]"; }
|
GROUP BY t.topic_id, $sort_by_sql[$sort_key]"; }
|
$this->db->sql_query($sql_count); $result_count = (int) $this->db->sql_fetchfield('result_count');
| $result = $this->db->sql_query($sql_count); $result_count = ($type == 'posts') ? (int) $this->db->sql_fetchfield('result_count') : count($this->db->sql_fetchrowset($result)); $this->db->sql_freeresult($result);
|
if (!$result_count) {
| if (!$result_count) {
|