diff options
Diffstat (limited to 'MLEB/Translate/api/ApiQueryMessageCollection.php')
-rw-r--r-- | MLEB/Translate/api/ApiQueryMessageCollection.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/MLEB/Translate/api/ApiQueryMessageCollection.php b/MLEB/Translate/api/ApiQueryMessageCollection.php index d8c2315e..20c819c1 100644 --- a/MLEB/Translate/api/ApiQueryMessageCollection.php +++ b/MLEB/Translate/api/ApiQueryMessageCollection.php @@ -122,10 +122,17 @@ class ApiQueryMessageCollection extends ApiQueryGeneratorBase { } if ( is_null( $resultPageSet ) ) { - $result->setIndexedTagName_internal( - array( 'query', $this->getModuleName() ), - 'message' - ); + if ( defined( 'ApiResult::META_CONTENT' ) ) { + $result->addIndexedTagName( + array( 'query', $this->getModuleName() ), + 'message' + ); + } else { + $result->setIndexedTagName_internal( + array( 'query', $this->getModuleName() ), + 'message' + ); + } } else { $resultPageSet->populateFromTitles( $pages ); } @@ -162,7 +169,11 @@ class ApiQueryMessageCollection extends ApiQueryGeneratorBase { if ( isset( $props['properties'] ) ) { foreach ( $message->getPropertyNames() as $prop ) { $data['properties'][$prop] = $message->getProperty( $prop ); - $result->setIndexedTagName_recursive( $data['properties'], 'val' ); + if ( defined( 'ApiResult::META_CONTENT' ) ) { + ApiResult::setIndexedTagNameRecursive( $data['properties'], 'val' ); + } else { + $result->setIndexedTagName_recursive( $data['properties'], 'val' ); + } } } |