Use READ_LATEST constant and fix a soft type hint

Change-Id: I2123c5efe01a5b42daeec9c7b0eefce089864657
This commit is contained in:
Thiemo Kreuz 2019-10-23 12:45:51 +02:00
parent 79b82ea45a
commit d79dd00e01
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ class SpecialNotifications extends SpecialPage {
}
/**
* @param string $par
* @param string|null $par
* @suppress SecurityCheck-DoubleEscaped Different members of $notifArray being conflated
*/
public function execute( $par ) {

View file

@ -211,7 +211,7 @@ class GenerateSampleNotifications extends Maintenance {
private function addToPageContent( Title $title, User $agent, $contentText ) {
$page = WikiPage::factory( $title );
$previousContent = "";
$page->loadPageData( 'fromdbmaster' );
$page->loadPageData( WikiPage::READ_LATEST );
$revision = $page->getRevision();
if ( $revision ) {
$content = $revision->getContent( RevisionRecord::FOR_PUBLIC );