Force string to UTF-8 if we have mb stuff available.
[lhc/web/wiklou.git] / includes / SpecialUncategorizedimages.php
1 <?php
2
3 /**
4 * Special page lists images which haven't been categorised
5 *
6 * @addtogroup SpecialPage
7 * @author Rob Church <robchur@gmail.com>
8 */
9
10 class UncategorizedImagesPage extends ImageQueryPage {
11
12 function getName() {
13 return 'Uncategorizedimages';
14 }
15
16 function sortDescending() {
17 return false;
18 }
19
20 function isExpensive() {
21 return true;
22 }
23
24 function isSyndicated() {
25 return false;
26 }
27
28 function getSQL() {
29 $dbr = wfGetDB( DB_SLAVE );
30 list( $page, $categorylinks ) = $dbr->tableNamesN( 'page', 'categorylinks' );
31 $ns = NS_IMAGE;
32
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";
37 }
38
39 }
40
41 function wfSpecialUncategorizedimages() {
42 $uip = new UncategorizedImagesPage();
43 list( $limit, $offset ) = wfCheckLimits();
44 return $uip->doQuery( $offset, $limit );
45 }
46
47