Load all extension messages in the specified language code, not only messages defined...
[mediawiki.git] / includes / SpecialUncategorizedimages.php
blob986ec967e6118d07ae524a45eb35e3587ab9b1b4
1 <?php
2 /**
3 * Special page lists images which haven't been categorised
5 * @file
6 * @ingroup SpecialPage
7 * @author Rob Church <robchur@gmail.com>
8 */
10 /**
11 * @ingroup SpecialPage
13 class UncategorizedImagesPage extends ImageQueryPage {
15 function getName() {
16 return 'Uncategorizedimages';
19 function sortDescending() {
20 return false;
23 function isExpensive() {
24 return true;
27 function isSyndicated() {
28 return false;
31 function getSQL() {
32 $dbr = wfGetDB( DB_SLAVE );
33 list( $page, $categorylinks ) = $dbr->tableNamesN( 'page', 'categorylinks' );
34 $ns = NS_IMAGE;
36 return "SELECT 'Uncategorizedimages' AS type, page_namespace AS namespace,
37 page_title AS title, page_title AS value
38 FROM {$page} LEFT JOIN {$categorylinks} ON page_id = cl_from
39 WHERE cl_from IS NULL AND page_namespace = {$ns} AND page_is_redirect = 0";
44 function wfSpecialUncategorizedimages() {
45 $uip = new UncategorizedImagesPage();
46 list( $limit, $offset ) = wfCheckLimits();
47 return $uip->doQuery( $offset, $limit );