X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=includes%2FCommentStore.php;h=1a60bb741266ae3251e95593cc9ae32f0890a9b1;hb=333eaea7f7bf2d7dcaed1e9da62477a5245cfc72;hp=cba7a150d3a49360eff355d3b4f0401fb86b3130;hpb=c984a1f2f8e9f409bdf7d8464447bfe39c8bc178;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CommentStore.php b/includes/CommentStore.php index cba7a150d3..1a60bb7412 100644 --- a/includes/CommentStore.php +++ b/includes/CommentStore.php @@ -82,7 +82,11 @@ class CommentStore { */ protected $key = null; - /** @var int One of the MIGRATION_* constants */ + /** + * @var int One of the MIGRATION_* constants + * @todo Deprecate and remove once extensions seem unlikely to need to use + * it for migration anymore. + */ protected $stage; /** @var array[] Cache for `self::getJoin()` */ @@ -94,7 +98,8 @@ class CommentStore { /** * @param Language $lang Language to use for comment truncation. Defaults * to content language. - * @param int $migrationStage One of the MIGRATION_* constants + * @param int $migrationStage One of the MIGRATION_* constants. Always + * MIGRATION_NEW for MediaWiki core since 1.33. */ public function __construct( Language $lang, $migrationStage ) { $this->stage = $migrationStage; @@ -109,10 +114,10 @@ class CommentStore { * @return CommentStore */ public static function newKey( $key ) { - global $wgCommentTableSchemaMigrationStage; wfDeprecated( __METHOD__, '1.31' ); - $store = new CommentStore( MediaWikiServices::getInstance()->getContentLanguage(), - $wgCommentTableSchemaMigrationStage ); + $store = new CommentStore( + MediaWikiServices::getInstance()->getContentLanguage(), MIGRATION_NEW + ); $store->key = $key; return $store; }