mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-14 19:30:11 +00:00
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:
parent
33263f32e6
commit
54b4d1e345
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue