$out = new OutputPage( $context );
$context->setOutput( $out );
- $out->addModules( 'mediawiki.apipretty' );
+ $out->addModuleStyles( 'mediawiki.apipretty' );
$out->setPageTitle( $context->msg( 'api-format-title' ) );
// When the format without suffix 'fm' is defined, there is a non-html version
}
/**
- * To avoid code duplication with the deprecation of dbg, dump, txt, wddx,
+ * To avoid code duplication with the deprecation of dbg, txt
* and yaml, this method is added to do the necessary work. It should be
* removed when those deprecated formats are removed.
*/
// Escape everything first for full coverage
$text = htmlspecialchars( $text );
- if ( $this->mFormat === 'XML' || $this->mFormat === 'WDDX' ) {
+ if ( $this->mFormat === 'XML' ) {
// encode all comments or tags as safe blue strings
$text = str_replace( '<', '<span style="color:blue;"><', $text );
$text = str_replace( '>', '></span>', $text );
* are required to ignore it or filter it out.
*
* @deprecated since 1.25
- * @return bool
+ * @return bool Always true
*/
public function getNeedsRawData() {
- return false;
+ wfDeprecated( __METHOD__, '1.25' );
+ return true;
}
/**@}*/