r91599 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91598‎ | r91599 | r91600 >
Date:20:41, 6 July 2011
Author:hartman
Status:ok
Tags:
Comment:
Actually return the title of the section, instead of the pagetitle when requesting srprop=sectiontitle from API search.

Fixes bug 29746
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -166,6 +166,8 @@
167167 * (bug 26763) Make RSS/Atom of user contributions more visible
168168 * (bug 25133) Allow redirects also for action=parse&pageid
169169 * (bug 29745) Fatal error in API search
 170+* (bug 29476) API returns page title instead of sectiontitle for
 171+ srprop=sectiontitle
170172
171173 === Languages updated in 1.19 ===
172174
Index: trunk/phase3/includes/api/ApiQuerySearch.php
@@ -162,7 +162,7 @@
163163 }
164164 if ( !is_null( $result->getSectionTitle() ) ) {
165165 if ( isset( $prop['sectiontitle'] ) ) {
166 - $vals['sectiontitle'] = $result->getSectionTitle();
 166+ $vals['sectiontitle'] = $result->getSectionTitle()->getFragment();
167167 }
168168 if ( isset( $prop['sectionsnippet'] ) ) {
169169 $vals['sectionsnippet'] = $result->getSectionSnippet();

Status & tagging log