SpecialUnusedimages: Use Config instead of globals
authorKunal Mehta <legoktm@gmail.com>
Wed, 6 Aug 2014 15:23:27 +0000 (16:23 +0100)
committerKunal Mehta <legoktm@gmail.com>
Wed, 6 Aug 2014 15:23:27 +0000 (16:23 +0100)
Change-Id: Iee9398ec8bc223b4833aa4055c32577cfc3227e1

includes/specials/SpecialUnusedimages.php

index 743c587..36ec09e 100644 (file)
@@ -44,7 +44,6 @@ class UnusedimagesPage extends ImageQueryPage {
        }
 
        function getQueryInfo() {
-               global $wgCountCategorizedImagesAsUsed;
                $retval = array(
                        'tables' => array( 'image', 'imagelinks' ),
                        'fields' => array(
@@ -58,7 +57,7 @@ class UnusedimagesPage extends ImageQueryPage {
                        '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' );