summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialUnusedimages.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /includes/specials/SpecialUnusedimages.php
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/specials/SpecialUnusedimages.php')
-rw-r--r--includes/specials/SpecialUnusedimages.php25
1 files changed, 13 insertions, 12 deletions
diff --git a/includes/specials/SpecialUnusedimages.php b/includes/specials/SpecialUnusedimages.php
index d332db75..36ec09ec 100644
--- a/includes/specials/SpecialUnusedimages.php
+++ b/includes/specials/SpecialUnusedimages.php
@@ -44,31 +44,32 @@ class UnusedimagesPage extends ImageQueryPage {
}
function getQueryInfo() {
- global $wgCountCategorizedImagesAsUsed;
$retval = array(
'tables' => array( 'image', 'imagelinks' ),
- 'fields' => array( 'namespace' => NS_FILE,
- 'title' => 'img_name',
- 'value' => 'img_timestamp',
- 'img_user', 'img_user_text',
- 'img_description' ),
+ 'fields' => array(
+ 'namespace' => NS_FILE,
+ 'title' => 'img_name',
+ 'value' => 'img_timestamp',
+ 'img_user', 'img_user_text',
+ 'img_description'
+ ),
'conds' => array( 'il_to IS NULL' ),
- 'join_conds' => array( 'imagelinks' => array(
- 'LEFT JOIN', 'il_to = img_name' ) )
+ 'join_conds' => array( 'imagelinks' => array( 'LEFT JOIN', 'il_to = img_name' ) )
);
- if ( $wgCountCategorizedImagesAsUsed ) {
+ if ( $this->getConfig()->get( 'CountCategorizedImagesAsUsed' ) ) {
// Order is significant
$retval['tables'] = array( 'image', 'page', 'categorylinks',
- 'imagelinks' );
+ 'imagelinks' );
$retval['conds']['page_namespace'] = NS_FILE;
$retval['conds'][] = 'cl_from IS NULL';
$retval['conds'][] = 'img_name = page_title';
$retval['join_conds']['categorylinks'] = array(
- 'LEFT JOIN', 'cl_from = page_id' );
+ 'LEFT JOIN', 'cl_from = page_id' );
$retval['join_conds']['imagelinks'] = array(
- 'LEFT JOIN', 'il_to = page_title' );
+ 'LEFT JOIN', 'il_to = page_title' );
}
+
return $retval;
}