Call method getText() instead of getNativeData()

Classes derived from TextContent support the getText method. The previously called method getNativeData is going to be deprecated.

Bug:  T155582
Change-Id: I550d2ecf2c4b71da17258af0c2306c1ca49806d3
This commit is contained in:
Holger Knust 2019-03-27 11:02:17 -04:00
parent 8328acb9b1
commit 6c231cbe4d

View file

@ -27,7 +27,7 @@ class ScribuntoContent extends TextContent {
public function validate( Title $title ) {
$engine = Scribunto::newDefaultEngine();
$engine->setTitle( $title );
return $engine->validate( $this->getNativeData(), $title->getPrefixedDBkey() );
return $engine->validate( $this->getText(), $title->getPrefixedDBkey() );
}
public function prepareSave( WikiPage $page, $flags, $parentRevId, User $user ) {
@ -49,7 +49,7 @@ class ScribuntoContent extends TextContent {
) {
global $wgParser;
$text = $this->getNativeData();
$text = $this->getText();
// Get documentation, if any
$output = new ParserOutput();