X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Fchanges%2FRecentChange.php;h=2d37eacdc038bbd51a47e3e99d241e44de18dcdb;hb=fd24be4fc537497531f1b1dad9c8bb7b6fb81ff0;hp=819f1701dc22df136ffba11f87f05b7037ab9d16;hpb=1360a2884ac2ce44b1a81df9fef96b72853c845e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index 819f1701dc..2d37eacdc0 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -19,6 +19,7 @@ * * @file */ +use MediaWiki\ChangeTags\Taggable; /** * Utility class for creating new RC entries @@ -65,7 +66,7 @@ * we're having to include both rc_comment and rc_comment_text/rc_comment_data * so random crap works right. */ -class RecentChange { +class RecentChange implements Taggable { // Constants for the rc_source field. Extensions may also have // their own source constants. const SRC_EDIT = 'mw.edit'; @@ -228,13 +229,14 @@ class RecentChange { global $wgActorTableSchemaMigrationStage; wfDeprecated( __METHOD__, '1.31' ); - if ( $wgActorTableSchemaMigrationStage > MIGRATION_WRITE_BOTH ) { + if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) { // If code is using this instead of self::getQueryInfo(), there's a // decent chance it's going to try to directly access // $row->rc_user or $row->rc_user_text and we can't give it - // useful values here once those aren't being written anymore. + // useful values here once those aren't being used anymore. throw new BadMethodCallException( - 'Cannot use ' . __METHOD__ . ' when $wgActorTableSchemaMigrationStage > MIGRATION_WRITE_BOTH' + 'Cannot use ' . __METHOD__ + . ' when $wgActorTableSchemaMigrationStage has SCHEMA_COMPAT_READ_NEW' ); } @@ -1197,7 +1199,7 @@ class RecentChange { * * @since 1.28 * - * @param string|array $tags + * @param string|string[] $tags */ public function addTags( $tags ) { if ( is_string( $tags ) ) {