Index: trunk/phase3/includes/api/ApiOpenSearch.php |
— | — | @@ -49,9 +49,8 @@ |
50 | 50 | $namespaces = $params['namespace']; |
51 | 51 | $suggest = $params['suggest']; |
52 | 52 | |
53 | | - // $wgEnableMWSuggest hit incoming when $wgEnableMWSuggest is |
54 | | - // disabled |
55 | | - if( $suggest && !$wgEnableMWSuggest ) |
| 53 | + // MWSuggest or similar hit |
| 54 | + if( $suggest && !$wgEnableOpenSearchSuggest ) |
56 | 55 | $srchres = array(); |
57 | 56 | else { |
58 | 57 | // Open search results may be stored for a very long |
— | — | @@ -91,7 +90,7 @@ |
92 | 91 | 'search' => 'Search string', |
93 | 92 | 'limit' => 'Maximum amount of results to return', |
94 | 93 | 'namespace' => 'Namespaces to search', |
95 | | - 'suggest' => 'Do nothing if $wgEnableMWSuggest is false', |
| 94 | + 'suggest' => 'Do nothing if $wgEnableOpenSearchSuggest is false', |
96 | 95 | ); |
97 | 96 | } |
98 | 97 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1976,10 +1976,18 @@ |
1977 | 1977 | /** |
1978 | 1978 | * Enable suggestions while typing in search boxes |
1979 | 1979 | * (results are passed around in OpenSearch format) |
| 1980 | + * Requires $wgEnableOpenSearchSuggest = true; |
1980 | 1981 | */ |
1981 | 1982 | $wgEnableMWSuggest = false; |
1982 | 1983 | |
1983 | 1984 | /** |
| 1985 | + * Enable OpenSearch suggestions requested by MediaWiki. Set this to |
| 1986 | + * false if you've disabled MWSuggest or another suggestion script and |
| 1987 | + * want reduce load caused by cached scripts pulling suggestions. |
| 1988 | + */ |
| 1989 | +$wgEnableOpenSearchSuggest = true; |
| 1990 | + |
| 1991 | +/** |
1984 | 1992 | * Template for internal MediaWiki suggestion engine, defaults to API action=opensearch |
1985 | 1993 | * |
1986 | 1994 | * Placeholders: {searchTerms}, {namespaces}, {dbname} |