MediaWiki  1.23.8
SpecialUnusedimages.php
Go to the documentation of this file.
1 <?php
30  function __construct( $name = 'Unusedimages' ) {
31  parent::__construct( $name );
32  }
33 
34  function isExpensive() {
35  return true;
36  }
37 
38  function sortDescending() {
39  return false;
40  }
41 
42  function isSyndicated() {
43  return false;
44  }
45 
46  function getQueryInfo() {
47  global $wgCountCategorizedImagesAsUsed;
48  $retval = array(
49  'tables' => array( 'image', 'imagelinks' ),
50  'fields' => array(
51  'namespace' => NS_FILE,
52  'title' => 'img_name',
53  'value' => 'img_timestamp',
54  'img_user', 'img_user_text',
55  'img_description'
56  ),
57  'conds' => array( 'il_to IS NULL' ),
58  'join_conds' => array( 'imagelinks' => array( 'LEFT JOIN', 'il_to = img_name' ) )
59  );
60 
61  if ( $wgCountCategorizedImagesAsUsed ) {
62  // Order is significant
63  $retval['tables'] = array( 'image', 'page', 'categorylinks',
64  'imagelinks' );
65  $retval['conds']['page_namespace'] = NS_FILE;
66  $retval['conds'][] = 'cl_from IS NULL';
67  $retval['conds'][] = 'img_name = page_title';
68  $retval['join_conds']['categorylinks'] = array(
69  'LEFT JOIN', 'cl_from = page_id' );
70  $retval['join_conds']['imagelinks'] = array(
71  'LEFT JOIN', 'il_to = page_title' );
72  }
73 
74  return $retval;
75  }
76 
77  function usesTimestamps() {
78  return true;
79  }
80 
81  function getPageHeader() {
82  return $this->msg( 'unusedimagestext' )->parseAsBlock();
83  }
84 
85  protected function getGroupName() {
86  return 'maintenance';
87  }
88 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
UnusedimagesPage\getPageHeader
getPageHeader()
The content returned by this function will be output before any result.
Definition: SpecialUnusedimages.php:81
UnusedimagesPage\isSyndicated
isSyndicated()
Sometime we don't want to build rss / atom feeds.
Definition: SpecialUnusedimages.php:42
NS_FILE
const NS_FILE
Definition: Defines.php:85
UnusedimagesPage\isExpensive
isExpensive()
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
Definition: SpecialUnusedimages.php:34
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
SpecialPage\msg
msg()
Wrapper around wfMessage that sets the current context.
Definition: SpecialPage.php:609
UnusedimagesPage\sortDescending
sortDescending()
Override to sort by increasing values.
Definition: SpecialUnusedimages.php:38
UnusedimagesPage
A special page that lists unused images.
Definition: SpecialUnusedimages.php:29
UnusedimagesPage\usesTimestamps
usesTimestamps()
Does this query return timestamps rather than integers in its 'value' field? If true,...
Definition: SpecialUnusedimages.php:77
UnusedimagesPage\__construct
__construct( $name='Unusedimages')
Definition: SpecialUnusedimages.php:30
UnusedimagesPage\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialUnusedimages.php:85
ImageQueryPage
Variant of QueryPage which uses a gallery to output results, thus suited for reports generating image...
Definition: ImageQueryPage.php:31
$retval
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account incomplete not yet checked for validity & $retval
Definition: hooks.txt:237
UnusedimagesPage\getQueryInfo
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
Definition: SpecialUnusedimages.php:46