mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
Replace hard-deprecated WikiPage::getRevision call in generateSampleNotifications.php
...but keep soft-deprecated WikiPage::doEditContent because no realistic replacement exists :/ Change-Id: Iee8c2fcfcbd5cb8c15854b1ada9eb691a2197658
This commit is contained in:
parent
5e9eac03d0
commit
dd1aed2930
|
@ -215,9 +215,9 @@ class GenerateSampleNotifications extends Maintenance {
|
|||
$page = WikiPage::factory( $title );
|
||||
$previousContent = "";
|
||||
$page->loadPageData( WikiPage::READ_LATEST );
|
||||
$revision = $page->getRevision();
|
||||
$revision = $page->getRevisionRecord();
|
||||
if ( $revision ) {
|
||||
$content = $revision->getContent( RevisionRecord::FOR_PUBLIC );
|
||||
$content = $revision->getContent( SlotRecord::MAIN, RevisionRecord::FOR_PUBLIC );
|
||||
if ( $content instanceof WikitextContent ) {
|
||||
$previousContent = $content->getText();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue