X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2Ffile%2FArchivedFile.php;h=4a84cff172a5e72674be3fe3c085b1424f42caeb;hb=0756849eb8450909d14dcb619307bdf07f0c7fcd;hp=5589c687e5eb126c1f4d93516f05b9d8c64e1e2a;hpb=15f6eff90c305d405fe4331c8a8dc8caa842e5b3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/file/ArchivedFile.php b/includes/filerepo/file/ArchivedFile.php index 5589c687e5..4a84cff172 100644 --- a/includes/filerepo/file/ArchivedFile.php +++ b/includes/filerepo/file/ArchivedFile.php @@ -221,13 +221,14 @@ class ArchivedFile { static function selectFields() { global $wgActorTableSchemaMigrationStage; - 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->fa_user or $row->fa_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' ); } @@ -248,7 +249,7 @@ class ArchivedFile { 'fa_minor_mime', 'fa_user', 'fa_user_text', - 'fa_actor' => $wgActorTableSchemaMigrationStage > MIGRATION_OLD ? 'fa_actor' : 'NULL', + 'fa_actor' => 'NULL', 'fa_timestamp', 'fa_deleted', 'fa_deleted_timestamp', /* Used by LocalFileRestoreBatch */