dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix error in various deprecated selectFields() methods
[lhc/web/wiklou.git]
/
includes
/
filerepo
/
file
/
OldLocalFile.php
diff --git
a/includes/filerepo/file/OldLocalFile.php
b/includes/filerepo/file/OldLocalFile.php
index
3a6b879
..
b5c44f2
100644
(file)
--- a/
includes/filerepo/file/OldLocalFile.php
+++ b/
includes/filerepo/file/OldLocalFile.php
@@
-21,6
+21,8
@@
* @ingroup FileAbstraction
*/
* @ingroup FileAbstraction
*/
+use MediaWiki\MediaWikiServices;
+
/**
* Class to represent a file in the oldimage table
*
/**
* Class to represent a file in the oldimage table
*
@@
-136,11
+138,11
@@
class OldLocalFile extends LocalFile {
'oi_minor_mime',
'oi_user',
'oi_user_text',
'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',
'oi_timestamp',
'oi_deleted',
'oi_sha1',
- ] +
CommentStore::ge
tStore()->getFields( 'oi_description' );
+ ] +
MediaWikiServices::getInstance()->getCommen
tStore()->getFields( 'oi_description' );
}
/**
}
/**
@@
-155,7
+157,7
@@
class OldLocalFile extends LocalFile {
* - joins: (array) to include in the `$join_conds` to `IDatabase->select()`
*/
public static function getQueryInfo( array $options = [] ) {
* - joins: (array) to include in the `$join_conds` to `IDatabase->select()`
*/
public static function getQueryInfo( array $options = [] ) {
- $commentQuery =
CommentStore::ge
tStore()->getJoin( 'oi_description' );
+ $commentQuery =
MediaWikiServices::getInstance()->getCommen
tStore()->getJoin( 'oi_description' );
$actorQuery = ActorMigration::newMigration()->getJoin( 'oi_user' );
$ret = [
'tables' => [ 'oldimage' ] + $commentQuery['tables'] + $actorQuery['tables'],
$actorQuery = ActorMigration::newMigration()->getJoin( 'oi_user' );
$ret = [
'tables' => [ 'oldimage' ] + $commentQuery['tables'] + $actorQuery['tables'],
@@
-446,7
+448,8
@@
class OldLocalFile extends LocalFile {
return false;
}
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',
[
$actorFields = ActorMigration::newMigration()->getInsertValues( $dbw, 'oi_user', $user );
$dbw->insert( 'oldimage',
[