fix typo
[mediawiki.git] / includes / SpecialUncategorizedimages.php
blob23deefe8505a41f7cbda22063a846787ba87ce12
1 <?php
3 /**
4 * Special page lists images which haven't been categorised
6 * @addtogroup SpecialPage
7 * @author Rob Church <robchur@gmail.com>
8 */
10 class UncategorizedImagesPage extends ImageQueryPage {
12 function getName() {
13 return 'Uncategorizedimages';
16 function sortDescending() {
17 return false;
20 function isExpensive() {
21 return true;
24 function isSyndicated() {
25 return false;
28 function getSQL() {
29 $dbr = wfGetDB( DB_SLAVE );
30 list( $page, $categorylinks ) = $dbr->tableNamesN( 'page', 'categorylinks' );
31 $ns = NS_IMAGE;
33 return "SELECT 'Uncategorizedimages' AS type, page_namespace AS namespace,
34 page_title AS title, page_title AS value
35 FROM {$page} LEFT JOIN {$categorylinks} ON page_id = cl_from
36 WHERE cl_from IS NULL AND page_namespace = {$ns} AND page_is_redirect = 0";
41 function wfSpecialUncategorizedimages() {
42 $uip = new UncategorizedImagesPage();
43 list( $limit, $offset ) = wfCheckLimits();
44 return $uip->doQuery( $offset, $limit );