@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | |
| 224 | 224 | global $smcFunc; |
| 225 | 225 | |
| 226 | - $result = $smcFunc['db_query']('',' |
|
| 226 | + $result = $smcFunc['db_query']('', ' |
|
| 227 | 227 | SELECT DISTINCT id_search |
| 228 | 228 | FROM {db_prefix}log_search_results |
| 229 | 229 | WHERE id_msg = {int:id_msg}', |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | if (count($id_searchs) < 1) |
| 240 | 240 | return; |
| 241 | 241 | |
| 242 | - $smcFunc['db_query']('',' |
|
| 242 | + $smcFunc['db_query']('', ' |
|
| 243 | 243 | DELETE FROM {db_prefix}log_search_results |
| 244 | 244 | WHERE id_search in ({array_int:id_searchs})', |
| 245 | 245 | array( |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | ) |
| 248 | 248 | ); |
| 249 | 249 | |
| 250 | - $smcFunc['db_query']('',' |
|
| 250 | + $smcFunc['db_query']('', ' |
|
| 251 | 251 | DELETE FROM {db_prefix}log_search_topics |
| 252 | 252 | WHERE id_search in ({array_int:id_searchs})', |
| 253 | 253 | array( |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | ) |
| 256 | 256 | ); |
| 257 | 257 | |
| 258 | - $smcFunc['db_query']('',' |
|
| 258 | + $smcFunc['db_query']('', ' |
|
| 259 | 259 | DELETE FROM {db_prefix}log_search_messages |
| 260 | 260 | WHERE id_search in ({array_int:id_searchs})', |
| 261 | 261 | array( |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | /** |
| 34 | 34 | * @var array Which databases support this method? |
| 35 | 35 | */ |
| 36 | - protected $supported_databases = array('mysql','postgresql'); |
|
| 36 | + protected $supported_databases = array('mysql', 'postgresql'); |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * The constructor function |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $query_where = array(); |
| 177 | 177 | $query_params = $search_data['params']; |
| 178 | 178 | |
| 179 | - if( $smcFunc['db_title'] == "PostgreSQL") |
|
| 179 | + if ($smcFunc['db_title'] == "PostgreSQL") |
|
| 180 | 180 | $modSettings['search_simple_fulltext'] = true; |
| 181 | 181 | |
| 182 | 182 | if ($query_params['id_search']) |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | // if we have bool terms to search, add them in |
| 257 | 257 | if ($query_params['boolean_match']) |
| 258 | 258 | { |
| 259 | - if($smcFunc['db_title'] == "PostgreSQL") |
|
| 259 | + if ($smcFunc['db_title'] == "PostgreSQL") |
|
| 260 | 260 | { |
| 261 | 261 | $language_ftx = $smcFunc['db_search_language'](); |
| 262 | 262 | |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | } |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | - $ignoreRequest = $smcFunc['db_search_query']('insert_into_log_messages_fulltext', ($smcFunc['db_support_ignore'] ? ( ' |
|
| 271 | + $ignoreRequest = $smcFunc['db_search_query']('insert_into_log_messages_fulltext', ($smcFunc['db_support_ignore'] ? (' |
|
| 272 | 272 | INSERT IGNORE INTO {db_prefix}' . $search_data['insert_into'] . ' |
| 273 | 273 | (' . implode(', ', array_keys($query_select)) . ')') : '') . ' |
| 274 | 274 | SELECT ' . implode(', ', $query_select) . ' |
@@ -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(); |
@@ -997,7 +997,7 @@ discard block |
||
| 997 | 997 | // Are the result fresh? |
| 998 | 998 | if (!$update_cache && !empty($_SESSION['search_cache']['id_search'])) |
| 999 | 999 | { |
| 1000 | - $request = $smcFunc['db_query']('',' |
|
| 1000 | + $request = $smcFunc['db_query']('', ' |
|
| 1001 | 1001 | SELECT id_search |
| 1002 | 1002 | FROM {db_prefix}log_search_results |
| 1003 | 1003 | WHERE id_search = {int:search_id} |
@@ -1119,7 +1119,7 @@ discard block |
||
| 1119 | 1119 | SELECT |
| 1120 | 1120 | {int:id_search}, |
| 1121 | 1121 | t.id_topic, |
| 1122 | - ' . $relevance. ', |
|
| 1122 | + ' . $relevance . ', |
|
| 1123 | 1123 | ' . (empty($userQuery) ? 't.id_first_msg' : 'm.id_msg') . ', |
| 1124 | 1124 | 1 |
| 1125 | 1125 | FROM ' . $subject_query['from'] . (empty($subject_query['inner_join']) ? '' : ' |
@@ -1352,7 +1352,7 @@ discard block |
||
| 1352 | 1352 | if (empty($subject_query['where'])) |
| 1353 | 1353 | continue; |
| 1354 | 1354 | |
| 1355 | - $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? ( ' |
|
| 1355 | + $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? (' |
|
| 1356 | 1356 | INSERT IGNORE INTO {db_prefix}' . ($createTemporary ? 'tmp_' : '') . 'log_search_topics |
| 1357 | 1357 | (' . ($createTemporary ? '' : 'id_search, ') . 'id_topic)') : '') . ' |
| 1358 | 1358 | SELECT ' . ($createTemporary ? '' : $_SESSION['search_cache']['id_search'] . ', ') . 't.id_topic |
@@ -1579,7 +1579,7 @@ discard block |
||
| 1579 | 1579 | } |
| 1580 | 1580 | $main_query['select']['relevance'] = substr($relevance, 0, -3) . ') / ' . $new_weight_total . ' AS relevance'; |
| 1581 | 1581 | |
| 1582 | - $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? ( ' |
|
| 1582 | + $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? (' |
|
| 1583 | 1583 | INSERT IGNORE INTO ' . '{db_prefix}log_search_results |
| 1584 | 1584 | (' . implode(', ', array_keys($main_query['select'])) . ')') : '') . ' |
| 1585 | 1585 | SELECT |
@@ -1647,7 +1647,7 @@ discard block |
||
| 1647 | 1647 | $relevance = substr($relevance, 0, -3) . ') / ' . $weight_total . ' AS relevance'; |
| 1648 | 1648 | |
| 1649 | 1649 | $usedIDs = array_flip(empty($inserts) ? array() : array_keys($inserts)); |
| 1650 | - $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_sub_only', ($smcFunc['db_support_ignore'] ? ( ' |
|
| 1650 | + $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_sub_only', ($smcFunc['db_support_ignore'] ? (' |
|
| 1651 | 1651 | INSERT IGNORE INTO {db_prefix}log_search_results |
| 1652 | 1652 | (id_search, id_topic, relevance, id_msg, num_matches)') : '') . ' |
| 1653 | 1653 | SELECT |
@@ -2116,7 +2116,7 @@ discard block |
||
| 2116 | 2116 | if (strlen($query) == 0) |
| 2117 | 2117 | continue; |
| 2118 | 2118 | |
| 2119 | - $body_highlighted = preg_replace_callback('/((<[^>]*)|' . preg_quote(strtr($query, array('\'' => ''')), '/') . ')/i' . ($context['utf8'] ? 'u' : ''), function ($m) |
|
| 2119 | + $body_highlighted = preg_replace_callback('/((<[^>]*)|' . preg_quote(strtr($query, array('\'' => ''')), '/') . ')/i' . ($context['utf8'] ? 'u' : ''), function($m) |
|
| 2120 | 2120 | { |
| 2121 | 2121 | return isset($m[2]) && "$m[2]" == "$m[1]" ? stripslashes("$m[1]") : "<strong class=\"highlight\">$m[1]</strong>"; |
| 2122 | 2122 | }, $body_highlighted); |