$anyHidden = false;
if ( $this->fld_ids ) {
- $vals['revid'] = intval( $revision->getId() );
+ $vals['revid'] = (int)$revision->getId();
if ( !is_null( $revision->getParentId() ) ) {
- $vals['parentid'] = intval( $revision->getParentId() );
+ $vals['parentid'] = (int)$revision->getParentId();
}
}
if ( $this->fld_size ) {
try {
- $vals['size'] = intval( $revision->getSize() );
+ $vals['size'] = (int)$revision->getSize();
} catch ( RevisionAccessException $e ) {
// Back compat: If there's no size, return 0.
// @todo: Gergő says to mention T198099 as a "todo" here.
ApiResult::setArrayType( $vals, 'assoc' );
if ( $this->fld_slotsize ) {
- $vals['size'] = intval( $slot->getSize() );
+ $vals['size'] = (int)$slot->getSize();
}
if ( $this->fld_slotsha1 ) {
if ( $this->fld_parsetree || ( $this->fld_content && $this->generateXML ) ) {
if ( $content->getModel() === CONTENT_MODEL_WIKITEXT ) {
- $t = $content->getNativeData(); # note: don't set $text
+ $t = $content->getText(); # note: don't set $text
$wgParser->startExternalParse(
$title,
if ( $this->expandTemplates && !$this->parseContent ) {
if ( $content->getModel() === CONTENT_MODEL_WIKITEXT ) {
- $text = $content->getNativeData();
+ $text = $content->getText();
$text = $wgParser->preprocess(
$text,