* @ingroup FileAbstraction
*/
+use MediaWiki\MediaWikiServices;
+
/**
* Class to represent a file in the oldimage table
*
/**
* @param Title $title
* @param FileRepo $repo
- * @param string|int $time
+ * @param string|int|null $time
* @return self
* @throws MWException
*/
'oi_minor_mime',
'oi_user',
'oi_user_text',
- 'oi_actor' => $wgActorTableSchemaMigrationStage > MIGRATION_OLD ? 'oi_actor' : null,
+ 'oi_actor' => $wgActorTableSchemaMigrationStage > MIGRATION_OLD ? 'oi_actor' : 'NULL',
'oi_timestamp',
'oi_deleted',
'oi_sha1',
- ] + CommentStore::getStore()->getFields( 'oi_description' );
+ ] + MediaWikiServices::getInstance()->getCommentStore()->getFields( 'oi_description' );
}
/**
* - joins: (array) to include in the `$join_conds` to `IDatabase->select()`
*/
public static function getQueryInfo( array $options = [] ) {
- $commentQuery = CommentStore::getStore()->getJoin( 'oi_description' );
+ $commentQuery = MediaWikiServices::getInstance()->getCommentStore()->getJoin( 'oi_description' );
$actorQuery = ActorMigration::newMigration()->getJoin( 'oi_user' );
$ret = [
'tables' => [ 'oldimage' ] + $commentQuery['tables'] + $actorQuery['tables'],
return false;
}
- $commentFields = CommentStore::getStore()->insert( $dbw, 'oi_description', $comment );
+ $commentFields = MediaWikiServices::getInstance()->getCommentStore()
+ ->insert( $dbw, 'oi_description', $comment );
$actorFields = ActorMigration::newMigration()->getInsertValues( $dbw, 'oi_user', $user );
$dbw->insert( 'oldimage',
[