* (bug 18720) Add anchor field to action=parse&prop=sections output
* (bug 19423) The initial file description page used caption in user lang
rather than UI lang
+* Added snippet field to list=search output
=== Languages updated in 1.16 ===
}
private function run($resultPageSet = null) {
-
+ global $wgContLang;
$params = $this->extractRequestParams();
$limit = $params['limit'];
$this->dieUsage("{$what} search is disabled",
"search-{$what}-disabled");
+ $terms = $wgContLang->convertForSearchResult($matches->termMatches());
$titles = array ();
$count = 0;
while( $result = $matches->next() ) {
if (is_null($resultPageSet)) {
$vals = array();
ApiQueryBase::addTitleInfo($vals, $title);
+ $vals['snippet'] = $result->getTextSnippet($terms);
$fit = $this->getResult()->addValue(array('query', $this->getModuleName()), null, $vals);
if(!$fit)
{