Skip to content

Commit

Permalink
Revert helper classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Oct 5, 2021
1 parent 8f996a6 commit 9730f1a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion includes/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,15 @@ public static function newFromRow( $row, Parameters $parameters, Title $title, $
// CONTRIBUTION, CONTRIBUTOR
if ( $parameters->getParameter( 'addcontribution' ) ) {
$article->mContribution = $row['contribution'];
$article->mContributor = $row['contributor'];

// This is the wrong check since the ActorMigration may be in progress
// https://www.mediawiki.org/wiki/Actor_migration
if ( class_exists( 'ActorMigration' ) ) {
$article->mContributor = User::newFromActorId( $row['contributor'] )->getName();
} else {
$article->mContributor = $row['contributor'];
}

$article->mContrib = substr( '*****************', 0, (int)round( log( $row['contribution'] ) ) );
}

Expand Down

0 comments on commit 9730f1a

Please sign in to comment.