Merge "Fix reset interwiki table between tests"
[lhc/web/wiklou.git] / includes / specials / pagers / NewFilesPager.php
index 4815189..c214f1f 100644 (file)
@@ -75,7 +75,7 @@ class NewFilesPager extends RangeChronologicalPager {
                if ( $opts->getValue( 'newbies' ) ) {
                        // newbie = most recent 1% of users
                        $dbr = wfGetDB( DB_REPLICA );
-                       $max = $dbr->selectField( 'user', 'max(user_id)', false, __METHOD__ );
+                       $max = $dbr->selectField( 'user', 'max(user_id)', '', __METHOD__ );
                        $conds[] = $imgQuery['fields']['img_user'] . ' >' . (int)( $max - $max / 100 );
 
                        // there's no point in looking for new user activity in a far past;
@@ -110,7 +110,7 @@ class NewFilesPager extends RangeChronologicalPager {
                        $tables[] = 'recentchanges';
                        $conds['rc_type'] = RC_LOG;
                        $conds['rc_log_type'] = 'upload';
-                       $conds['rc_patrolled'] = 0;
+                       $conds['rc_patrolled'] = RecentChange::PRC_UNPATROLLED;
                        $conds['rc_namespace'] = NS_FILE;
 
                        if ( $wgActorTableSchemaMigrationStage === MIGRATION_NEW ) {
@@ -118,7 +118,7 @@ class NewFilesPager extends RangeChronologicalPager {
                        } else {
                                $rcQuery = ActorMigration::newMigration()->getJoin( 'rc_user' );
                                $tables += $rcQuery['tables'];
-                               $joins += $rcQuery['joins'];
+                               $jconds += $rcQuery['joins'];
                                $jcond = $rcQuery['fields']['rc_user'] . ' = ' . $imgQuery['fields']['img_user'];
                        }
                        $jconds['recentchanges'] = [