Replaced "Revision::getText()" depracated in MediaWiki 1.21

"Revision::getText()" is deprecated in MediaWiki 1.21. Replaced usage

Bug: T151973
Change-Id: I91f93341ac642327657f888ebda7ff9d33f428bf
This commit is contained in:
rlot 2016-12-12 20:49:38 +01:00
parent 33263f32e6
commit 54b4d1e345

View file

@ -1233,10 +1233,11 @@ class SimpleCaptcha {
*/
function loadText( $title, $section, $flags = Revision::READ_LATEST ) {
$rev = Revision::newFromTitle( $title, false, $flags );
$content = $rev->getContent();
if ( is_null( $rev ) ) {
return "";
} else {
$text = $rev->getText();
$text = ContentHandler::getContentText( $content );
if ( $section != '' ) {
global $wgParser;
return $wgParser->getSection( $text, $section );