|
@@ -275,7 +275,7 @@ function PlushSearch2()
|
|
|
'sticky' => 'MAX(t.is_sticky)',
|
|
|
);
|
|
|
|
|
|
- call_integration_hook('integrate_search_weights', array($weight_factors));
|
|
|
+ call_integration_hook('integrate_search_weights', array(&$weight_factors));
|
|
|
|
|
|
$weight = array();
|
|
|
$weight_total = 0;
|
|
@@ -574,7 +574,7 @@ function PlushSearch2()
|
|
|
'num_replies',
|
|
|
'id_msg',
|
|
|
);
|
|
|
- call_integration_hook('integrate_search_sort_columns', array($sort_columns));
|
|
|
+ call_integration_hook('integrate_search_sort_columns', array(&$sort_columns));
|
|
|
if (empty($search_params['sort']) && !empty($_REQUEST['sort']))
|
|
|
list ($search_params['sort'], $search_params['sort_dir']) = array_pad(explode('|', $_REQUEST['sort']), 2, '');
|
|
|
$search_params['sort'] = !empty($search_params['sort']) && in_array($search_params['sort'], $sort_columns) ? $search_params['sort'] : 'relevance';
|
|
@@ -589,7 +589,7 @@ function PlushSearch2()
|
|
|
$recentMsg = $modSettings['maxMsgID'] - $minMsg;
|
|
|
|
|
|
// *** Parse the search query
|
|
|
- call_integration_hook('integrate_search_params', array($search_params));
|
|
|
+ call_integration_hook('integrate_search_params', array(&$search_params));
|
|
|
|
|
|
/*
|
|
|
* Unfortunately, searching for words like this is going to be slow, so we're blacklisting them.
|
|
@@ -598,7 +598,7 @@ function PlushSearch2()
|
|
|
* @todo Maybe only blacklist if they are the only word, or "any" is used?
|
|
|
*/
|
|
|
$blacklisted_words = array('img', 'url', 'quote', 'www', 'http', 'the', 'is', 'it', 'are', 'if');
|
|
|
- call_integration_hook('integrate_search_blacklisted_words', array($blacklisted_words));
|
|
|
+ call_integration_hook('integrate_search_blacklisted_words', array(&$blacklisted_words));
|
|
|
|
|
|
// What are we searching for?
|
|
|
if (empty($search_params['search']))
|
|
@@ -1071,7 +1071,7 @@ function PlushSearch2()
|
|
|
$subject_query_params['excluded_phrases_' . $count++] = empty($modSettings['search_match_words']) || $no_regexp ? '%' . strtr($phrase, array('_' => '\\_', '%' => '\\%')) . '%' : '[[:<:]]' . addcslashes(preg_replace(array('/([\[\]$.+*?|{}()])/'), array('[$1]'), $phrase), '\\\'') . '[[:>:]]';
|
|
|
}
|
|
|
}
|
|
|
- call_integration_hook('integrate_subject_only_search_query', array($subject_query, $subject_query_params));
|
|
|
+ call_integration_hook('integrate_subject_only_search_query', array(&$subject_query, &$subject_query_params));
|
|
|
|
|
|
$relevance = '1000 * (';
|
|
|
foreach ($weight_factors as $type => $value)
|
|
@@ -1316,7 +1316,7 @@ function PlushSearch2()
|
|
|
$subject_query['params']['exclude_phrase_' . $count++] = empty($modSettings['search_match_words']) || $no_regexp ? '%' . strtr($phrase, array('_' => '\\_', '%' => '\\%')) . '%' : '[[:<:]]' . addcslashes(preg_replace(array('/([\[\]$.+*?|{}()])/'), array('[$1]'), $phrase), '\\\'') . '[[:>:]]';
|
|
|
}
|
|
|
}
|
|
|
- call_integration_hook('integrate_subject_search_query', array($subject_query));
|
|
|
+ call_integration_hook('integrate_subject_search_query', array(&$subject_query));
|
|
|
|
|
|
// Nothing to search for?
|
|
|
if (empty($subject_query['where']))
|
|
@@ -1534,7 +1534,7 @@ function PlushSearch2()
|
|
|
$main_query['parameters']['board_query'] = $boardQuery;
|
|
|
}
|
|
|
}
|
|
|
- call_integration_hook('integrate_main_search_query', array($main_query));
|
|
|
+ call_integration_hook('integrate_main_search_query', array(&$main_query));
|
|
|
|
|
|
// Did we either get some indexed results, or otherwise did not do an indexed query?
|
|
|
if (!empty($indexedResults) || !$searchAPI->supportsMethod('indexedWordQuery', $query_params))
|
|
@@ -2094,7 +2094,7 @@ function prepareSearchContext($reset = false)
|
|
|
);
|
|
|
$counter++;
|
|
|
|
|
|
- call_integration_hook('integrate_search_message_context', array($counter, $output));
|
|
|
+ call_integration_hook('integrate_search_message_context', array($counter, &$output));
|
|
|
|
|
|
return $output;
|
|
|
}
|