* @ingroup Maintenance
*/
+use MediaWiki\Revision\RevisionRecord;
+
require_once __DIR__ . '/Maintenance.php';
/**
$rev = Revision::newFromTitle( $title );
$currentRevId = $rev->getId();
- while ( $rev && ( $rev->isDeleted( Revision::DELETED_TEXT )
- || LinkFilter::matchEntry( $rev->getContent( Revision::RAW ), $domain, $protocol ) )
+ while ( $rev && ( $rev->isDeleted( RevisionRecord::DELETED_TEXT )
+ || LinkFilter::matchEntry( $rev->getContent( RevisionRecord::RAW ), $domain, $protocol ) )
) {
$rev = $rev->getPrevious();
}
$page = WikiPage::factory( $title );
if ( $rev ) {
// Revert to this revision
- $content = $rev->getContent( Revision::RAW );
+ $content = $rev->getContent( RevisionRecord::RAW );
$this->output( "reverting\n" );
$page->doEditContent(