@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | |
660 | 660 | // Remove the phrase parts and extract the words. |
661 | 661 | $wordArray = preg_replace('~(?:^|\s)(?:[-]?)"(?:[^"]+)"(?:$|\s)~' . ($context['utf8'] ? 'u' : ''), ' ', $search_params['search']); |
662 | - $wordArray = explode(' ', $smcFunc['htmlspecialchars'](un_htmlspecialchars($wordArray), ENT_QUOTES)); |
|
662 | + $wordArray = explode(' ', $smcFunc['htmlspecialchars'](un_htmlspecialchars($wordArray), ENT_QUOTES)); |
|
663 | 663 | |
664 | 664 | // A minus sign in front of a word excludes the word.... so... |
665 | 665 | $excludedWords = array(); |
@@ -1102,7 +1102,7 @@ discard block |
||
1102 | 1102 | SELECT |
1103 | 1103 | {int:id_search}, |
1104 | 1104 | t.id_topic, |
1105 | - ' . $relevance. ', |
|
1105 | + ' . $relevance . ', |
|
1106 | 1106 | ' . (empty($userQuery) ? 't.id_first_msg' : 'm.id_msg') . ', |
1107 | 1107 | 1 |
1108 | 1108 | FROM ' . $subject_query['from'] . (empty($subject_query['inner_join']) ? '' : ' |
@@ -1335,7 +1335,7 @@ discard block |
||
1335 | 1335 | if (empty($subject_query['where'])) |
1336 | 1336 | continue; |
1337 | 1337 | |
1338 | - $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? ( ' |
|
1338 | + $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? (' |
|
1339 | 1339 | INSERT IGNORE INTO {db_prefix}' . ($createTemporary ? 'tmp_' : '') . 'log_search_topics |
1340 | 1340 | (' . ($createTemporary ? '' : 'id_search, ') . 'id_topic)') : '') . ' |
1341 | 1341 | SELECT ' . ($createTemporary ? '' : $_SESSION['search_cache']['id_search'] . ', ') . 't.id_topic |
@@ -1562,7 +1562,7 @@ discard block |
||
1562 | 1562 | } |
1563 | 1563 | $main_query['select']['relevance'] = substr($relevance, 0, -3) . ') / ' . $new_weight_total . ' AS relevance'; |
1564 | 1564 | |
1565 | - $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? ( ' |
|
1565 | + $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? (' |
|
1566 | 1566 | INSERT IGNORE INTO ' . '{db_prefix}log_search_results |
1567 | 1567 | (' . implode(', ', array_keys($main_query['select'])) . ')') : '') . ' |
1568 | 1568 | SELECT |
@@ -1630,7 +1630,7 @@ discard block |
||
1630 | 1630 | $relevance = substr($relevance, 0, -3) . ') / ' . $weight_total . ' AS relevance'; |
1631 | 1631 | |
1632 | 1632 | $usedIDs = array_flip(empty($inserts) ? array() : array_keys($inserts)); |
1633 | - $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_sub_only', ($smcFunc['db_support_ignore'] ? ( ' |
|
1633 | + $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_sub_only', ($smcFunc['db_support_ignore'] ? (' |
|
1634 | 1634 | INSERT IGNORE INTO {db_prefix}log_search_results |
1635 | 1635 | (id_search, id_topic, relevance, id_msg, num_matches)') : '') . ' |
1636 | 1636 | SELECT |
@@ -2099,7 +2099,7 @@ discard block |
||
2099 | 2099 | if (strlen($query) == 0) |
2100 | 2100 | continue; |
2101 | 2101 | |
2102 | - $body_highlighted = preg_replace_callback('/((<[^>]*)|' . preg_quote(strtr($query, array('\'' => ''')), '/') . ')/i' . ($context['utf8'] ? 'u' : ''), function ($m) |
|
2102 | + $body_highlighted = preg_replace_callback('/((<[^>]*)|' . preg_quote(strtr($query, array('\'' => ''')), '/') . ')/i' . ($context['utf8'] ? 'u' : ''), function($m) |
|
2103 | 2103 | { |
2104 | 2104 | return isset($m[2]) && "$m[2]" == "$m[1]" ? stripslashes("$m[1]") : "<strong class=\"highlight\">$m[1]</strong>"; |
2105 | 2105 | }, $body_highlighted); |