For MediaWiki (recent comments | status changes | tags | authors | states | release notes | statistics)
Index: trunk/phase3/includes/api/ApiQuerySearch.php =================================================================== --- trunk/phase3/includes/api/ApiQuerySearch.php (revision 52853) +++ trunk/phase3/includes/api/ApiQuerySearch.php (revision 52854) @@ -48,7 +48,7 @@ } private function run($resultPageSet = null) { - + global $wgContLang; $params = $this->extractRequestParams(); $limit = $params['limit']; @@ -87,6 +87,7 @@ $this->dieUsage("{$what} search is disabled", "search-{$what}-disabled"); + $terms = $wgContLang->convertForSearchResult($matches->termMatches()); $titles = array (); $count = 0; while( $result = $matches->next() ) { @@ -104,6 +105,7 @@ 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) { Index: trunk/phase3/RELEASE-NOTES =================================================================== --- trunk/phase3/RELEASE-NOTES (revision 52853) +++ trunk/phase3/RELEASE-NOTES (revision 52854) @@ -268,6 +268,7 @@ * (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 ===