Add constant for the name of the 'main' slot for MCR
[lhc/web/wiklou.git] / includes / api / ApiFeedContributions.php
index 92d504e..2b2b32c 100644 (file)
@@ -24,6 +24,7 @@ use MediaWiki\MediaWikiServices;
 use MediaWiki\Storage\RevisionAccessException;
 use MediaWiki\Storage\RevisionRecord;
 use MediaWiki\Storage\RevisionStore;
+use MediaWiki\Storage\SlotRecord;
 
 /**
  * @ingroup API
@@ -174,7 +175,7 @@ class ApiFeedContributions extends ApiBase {
                if ( $revision ) {
                        $msg = wfMessage( 'colon-separator' )->inContentLanguage()->text();
                        try {
-                               $content = $revision->getContent( 'main' );
+                               $content = $revision->getContent( SlotRecord::MAIN );
                        } catch ( RevisionAccessException $e ) {
                                $content = null;
                        }