11use MediaWiki\Cache\LinkBatchFactory;
31 private int $migrationStage;
35 LinkBatchFactory $linkBatchFactory
37 parent::__construct(
'ListDuplicatedFiles' );
68 $tables = [
'image' ];
69 $nameField =
'img_name';
70 $hashField =
'img_sha1';
74 $tables = [
'file',
'filerevision' ];
75 $nameField =
'file_name';
76 $hashField =
'fr_sha1';
77 $conds = [
'file_deleted' => 0 ];
78 $joins = [
'filerevision' => [
'JOIN',
'file_latest = fr_id' ] ];
84 'title' =>
"MIN($nameField)",
88 'join_conds' => $joins,
90 'GROUP BY' => $hashField,
91 'HAVING' =>
'count(*) > 1',
117 $msg = $this->
msg(
'listduplicatedfiles-entry' )
118 ->params( $image1->getText() )
119 ->numParams( $result->value - 1 )
120 ->params( $dupeSearch->getPrefixedDBkey() );
122 return $msg->parse();
128 parent::execute( $par );
138class_alias( SpecialListDuplicatedFiles::class,
'SpecialListDuplicatedFiles' );
const SCHEMA_COMPAT_READ_OLD
A class containing constants representing the names of configuration variables.
const FileSchemaMigrationStage
Name constant for the FileSchemaMigrationStage setting, for use with Config::get()
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
setDatabaseProvider(IConnectionProvider $databaseProvider)
executeLBFromResultWrapper(IResultWrapper $res, $ns=null)
Creates a new LinkBatch object, adds all pages from the passed result wrapper (MUST include title and...
setLinkBatchFactory(LinkBatchFactory $linkBatchFactory)
Parent class for all special pages.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.