Merge "Load installer i18n when running update.php"
[lhc/web/wiklou.git] / includes / Block.php
index a7d89e2..bf8bad1 100644 (file)
@@ -208,13 +208,14 @@ class Block {
        public 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->ipb_by or $row->ipb_by_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'
                        );
                }
 
@@ -224,7 +225,7 @@ class Block {
                        'ipb_address',
                        'ipb_by',
                        'ipb_by_text',
-                       'ipb_by_actor' => $wgActorTableSchemaMigrationStage > MIGRATION_OLD ? 'ipb_by_actor' : 'NULL',
+                       'ipb_by_actor' => 'NULL',
                        'ipb_timestamp',
                        'ipb_auto',
                        'ipb_anon_only',
@@ -1420,7 +1421,7 @@ class Block {
                }
 
                # Consider the possibility that this is not a username at all
-               # but actually an old subpage (bug #29797)
+               # but actually an old subpage (T31797)
                if ( strpos( $target, '/' ) !== false ) {
                        # An old subpage, drill down to the user behind it
                        $target = explode( '/', $target )[0];