X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=blobdiff_plain;f=includes%2Fspecials%2Fpagers%2FNewFilesPager.php;h=be4a1bdf1e9839434dd2bebf98f72410c507fbb5;hb=c29909e59fd89d9fc65a299687ad2aa2df995acc;hp=2cb2b4aaad7f83c859b24b0a8f377901e28f782a;hpb=73664393f8da2ece208e43214c0020d8259e160a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/pagers/NewFilesPager.php b/includes/specials/pagers/NewFilesPager.php index 2cb2b4aaad..be4a1bdf1e 100644 --- a/includes/specials/pagers/NewFilesPager.php +++ b/includes/specials/pagers/NewFilesPager.php @@ -22,6 +22,7 @@ /** * @ingroup Pager */ +use MediaWiki\Linker\LinkRenderer; use MediaWiki\MediaWikiServices; class NewFilesPager extends RangeChronologicalPager { @@ -39,9 +40,12 @@ 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' ) ); @@ -93,27 +97,17 @@ class NewFilesPager extends RangeChronologicalPager { } 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' ] ];