Remove Revision::getRevisionText from ApiQueryDeletedrevs
authorPetr Pchelko <ppchelko@wikimedia.org>
Wed, 18 Sep 2019 21:23:09 +0000 (14:23 -0700)
committerPetr Pchelko <ppchelko@wikimedia.org>
Thu, 19 Sep 2019 15:43:55 +0000 (08:43 -0700)
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

index b8caeb9..a47ca09 100644 (file)
@@ -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() );
                                }
                        }