/**
* @ingroup Pager
*/
+use MediaWiki\Linker\LinkRenderer;
use MediaWiki\MediaWikiServices;
class NewFilesPager extends RangeChronologicalPager {
/**
* @param IContextSource $context
* @param FormOptions $opts
+ * @param LinkRenderer $linkRenderer
*/
- public function __construct( IContextSource $context, FormOptions $opts ) {
- parent::__construct( $context );
+ public function __construct( IContextSource $context, FormOptions $opts,
+ LinkRenderer $linkRenderer
+ ) {
+ parent::__construct( $context, $linkRenderer );
$this->opts = $opts;
$this->setLimit( $opts->getValue( 'limit' ) );
}
if ( $opts->getValue( 'hidepatrolled' ) ) {
- global $wgActorTableSchemaMigrationStage;
-
$tables[] = 'recentchanges';
$conds['rc_type'] = RC_LOG;
$conds['rc_log_type'] = 'upload';
$conds['rc_patrolled'] = RecentChange::PRC_UNPATROLLED;
$conds['rc_namespace'] = NS_FILE;
- if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) {
- $jcond = 'rc_actor = ' . $imgQuery['fields']['img_actor'];
- } else {
- $rcQuery = ActorMigration::newMigration()->getJoin( 'rc_user' );
- $tables += $rcQuery['tables'];
- $jconds += $rcQuery['joins'];
- $jcond = $rcQuery['fields']['rc_user'] . ' = ' . $imgQuery['fields']['img_user'];
- }
$jconds['recentchanges'] = [
'JOIN',
[
'rc_title = img_name',
- $jcond,
+ 'rc_actor = ' . $imgQuery['fields']['img_actor'],
'rc_timestamp = img_timestamp'
]
];