34 private int $migrationStage;
37 parent::__construct(
'Unusedimages' );
58 $tables = [
'image' ];
59 $nameField =
'img_name';
60 $timestampField =
'img_timestamp';
64 $tables = [
'file',
'filerevision' ];
65 $nameField =
'file_name';
66 $timestampField =
'fr_timestamp';
67 $extraConds = [
'file_deleted' => 0 ];
68 $extraJoins = [
'filerevision' => [
'JOIN',
'file_latest = fr_id' ] ];
72 'tables' => array_merge( $tables, [
'imagelinks' ] ),
75 'title' => $nameField,
76 'value' => $timestampField,
78 'conds' => array_merge( [
'il_to' =>
null ], $extraConds ),
79 'join_conds' => array_merge(
80 [
'imagelinks' => [
'LEFT JOIN',
'il_to = ' . $nameField ] ],
87 $retval[
'tables'] = [
'image',
'page',
'categorylinks',
89 $retval[
'conds'][
'page_namespace'] =
NS_FILE;
90 $retval[
'conds'][
'cl_from'] =
null;
91 $retval[
'conds'][] = $nameField .
' = page_title';
92 $retval[
'join_conds'][
'categorylinks'] = [
93 'LEFT JOIN',
'cl_from = page_id' ];
94 $retval[
'join_conds'][
'imagelinks'] = [
95 'LEFT JOIN',
'il_to = page_title' ];
108 'unusedimagestext-categorizedimgisused'
111 return $this->
msg(
'unusedimagestext' )->parseAsBlock();
115 return 'maintenance';
123class_alias( SpecialUnusedImages::class,
'SpecialUnusedImages' );
const SCHEMA_COMPAT_READ_OLD
A class containing constants representing the names of configuration variables.
const CountCategorizedImagesAsUsed
Name constant for the CountCategorizedImagesAsUsed setting, for use with Config::get()
const FileSchemaMigrationStage
Name constant for the FileSchemaMigrationStage setting, for use with Config::get()
Variant of QueryPage which uses a gallery to output results, thus suited for reports generating image...
setDatabaseProvider(IConnectionProvider $databaseProvider)
getConfig()
Shortcut to get main config object.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.