: '[ ,.;:!?~!@#$%\^&*\(\)+=\-\\|\[\]"\'<>\n\r\/{}]'; // PHP 5.0 workaround
/**
- * Set to true to have the default MySQL search engine count total
+ * Set to true to have the search engine count total
* search matches to present in the Special:Search UI.
+ * Not supported by every search engine shipped with MW.
*
* This could however be slow on larger wikis, and is pretty flaky
* with the current title vs content split. Recommend avoiding until
* that's been worked out cleanly; but this may aid in testing the
* search UI and API to confirm that the result count works.
*/
-$wgSearchMySQLTotalHits = false;
+$wgCountTotalSearchHits = false;
/**
* Template for OpenSearch suggestions, defaults to API action=opensearch
}
protected function searchInternal( $term, $fulltext ) {
- global $wgSearchMySQLTotalHits;
+ global $wgCountTotalSearchHits;
$filteredTerm = $this->filter( $term );
$resultSet = $this->db->query( $this->getQuery( $filteredTerm, $fulltext ) );
$total = null;
- if( $wgSearchMySQLTotalHits ) {
+ if( $wgCountTotalSearchHits ) {
$totalResult = $this->db->query( $this->getCountQuery( $filteredTerm, $fulltext ) );
$row = $totalResult->fetchObject();
if( $row ) {
}
protected function searchInternal( $term, $fulltext ) {
- global $wgSearchMySQLTotalHits, $wgContLang;
+ global $wgCountTotalSearchHits, $wgContLang;
if ( !$this->fulltextSearchSupported() ) {
return null;
$resultSet = $this->db->query( $this->getQuery( $filteredTerm, $fulltext ) );
$total = null;
- if( $wgSearchMySQLTotalHits ) {
+ if( $wgCountTotalSearchHits ) {
$totalResult = $this->db->query( $this->getCountQuery( $filteredTerm, $fulltext ) );
$row = $totalResult->fetchObject();
if( $row ) {