45 private int $migrationStage;
51 parent::__construct(
'ListDuplicatedFiles' );
80 $tables = [
'image' ];
81 $nameField =
'img_name';
82 $hashField =
'img_sha1';
86 $tables = [
'file',
'filerevision' ];
87 $nameField =
'file_name';
88 $hashField =
'fr_sha1';
89 $conds = [
'file_deleted' => 0 ];
90 $joins = [
'filerevision' => [
'JOIN',
'file_latest = fr_id' ] ];
96 'title' =>
"MIN($nameField)",
100 'join_conds' => $joins,
102 'GROUP BY' => $hashField,
103 'HAVING' =>
'count(*) > 1',
126 $image1 = Title::makeTitle( $result->namespace, $result->title );
129 $msg = $this->
msg(
'listduplicatedfiles-entry' )
130 ->params( $image1->getText() )
131 ->numParams( $result->value - 1 )
132 ->params( $dupeSearch->getPrefixedDBkey() );
134 return $msg->parse();
139 parent::execute( $par );
148class_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.