From 9283760f340c6971d748fb574a35453fa7928807 Mon Sep 17 00:00:00 2001 From: Petr Pchelko Date: Wed, 18 Sep 2019 14:23:09 -0700 Subject: [PATCH] Remove Revision::getRevisionText from ApiQueryDeletedrevs This module is deprecated and is scheduled to be removed in T221869 but in order to unblock MCR work we can still remove the method call. Bug: T198343 Change-Id: I4aed8aa0dedc7284925ce9ba48db71e6ca2db5f0 --- includes/api/ApiQueryDeletedrevs.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index b8caeb947d..a47ca09522 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -23,6 +23,7 @@ use MediaWiki\MediaWikiServices; use MediaWiki\Storage\NameTableAccessException; use MediaWiki\Revision\RevisionRecord; +use MediaWiki\Revision\SlotRecord; /** * Query module to enumerate all deleted revisions. @@ -347,7 +348,9 @@ class ApiQueryDeletedrevs extends ApiQueryBase { $anyHidden = true; } if ( Revision::userCanBitfield( $row->ar_deleted, RevisionRecord::DELETED_TEXT, $user ) ) { - ApiResult::setContentValue( $rev, 'text', Revision::getRevisionText( $row, 'ar_' ) ); + ApiResult::setContentValue( $rev, 'text', + $revisionStore->newRevisionFromArchiveRow( $row ) + ->getContent( SlotRecord::MAIN )->serialize() ); } } -- 2.20.1