}
if ( isset( $prop['parsetree'] ) || $params['generatexml'] ) {
- if ( !isset( $prop['parsetree'] ) ) {
- $this->logFeatureUsage( 'action=parse&generatexml' );
- }
if ( $this->content->getModel() != CONTENT_MODEL_WIKITEXT ) {
$this->dieUsage( "parsetree is only supported for wikitext content", "notwikitext" );
}
* @return Content
*/
private function getContent( WikiPage $page, $pageId = null ) {
- $content = $page->getContent( Revision::RAW ); //XXX: really raw?
+ $content = $page->getContent( Revision::RAW ); // XXX: really raw?
if ( $this->section !== false && $content !== null ) {
$content = $this->getSectionContent(
foreach ( $links as $link => $sortkey ) {
$entry = array();
$entry['sortkey'] = $sortkey;
- ApiResult::setContentValue( $entry, 'category', $link );
+ // array keys will cast numeric category names to ints, so cast back to string
+ ApiResult::setContentValue( $entry, 'category', (string)$link );
if ( !isset( $hiddencats[$link] ) ) {
$entry['missing'] = true;
} elseif ( $hiddencats[$link] ) {
private function formatLimitReportData( $limitReportData ) {
$result = array();
- $apiResult = $this->getResult();
foreach ( $limitReportData as $name => $value ) {
$entry = array();