20privateint $migrationStage;
23 parent::__construct(
'Unusedimages' );
49 $nameField =
'img_name';
50 $timestampField =
'img_timestamp';
54 $tables = [
'file',
'filerevision' ];
55 $nameField =
'file_name';
56 $timestampField =
'fr_timestamp';
57 $extraConds = [
'file_deleted' => 0 ];
58 $extraJoins = [
'filerevision' => [
'JOIN',
'file_latest = fr_id' ] ];
62'tables' => array_merge( $tables, [
'imagelinks' ] ),
66'value' => $timestampField,
68'conds' => array_merge( [
'il_to' =>
null ], $extraConds ),
69'join_conds' => array_merge(
70 [
'imagelinks' => [
'LEFT JOIN',
'il_to = ' . $nameField ] ],
76// Order is significant 77 $retval[
'tables'] = [
'image',
'page',
'categorylinks',
79 $retval[
'conds'][
'page_namespace'] =
NS_FILE;
80 $retval[
'conds'][
'cl_from'] =
null;
81 $retval[
'conds'][] = $nameField .
' = page_title';
82 $retval[
'join_conds'][
'categorylinks'] = [
83'LEFT JOIN',
'cl_from = page_id' ];
84 $retval[
'join_conds'][
'imagelinks'] = [
85'LEFT JOIN',
'il_to = page_title' ];
100'unusedimagestext-categorizedimgisused' 103return $this->
msg(
'unusedimagestext' )->parseAsBlock();
116class_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()
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
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.
isSyndicated()
Sometimes we don't want to build rss / atom feeds.to override bool
getPageHeader()
The content returned by this function will be output before any result.to override string
isExpensive()
Should this query page only be updated offline on large wikis?If the query for this page is considere...
usesTimestamps()
Does this query return timestamps rather than integers in its 'value' field? If true,...
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
__construct(IConnectionProvider $dbProvider)
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
sortDescending()
Override to sort by increasing values.to override bool
Provide primary and replica IDatabase connections.