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:
Gergő Tisza 2020-05-27 15:44:59 +02:00
parent 5e9eac03d0
commit dd1aed2930
No known key found for this signature in database
GPG key ID: C34FEC97E6257F96

View file

@ -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();
}