4 * Special page lists images which haven't been categorised
6 * @addtogroup Special pages
7 * @author Rob Church <robchur@gmail.com>
10 class UncategorizedImagesPage
extends QueryPage
{
13 return 'Uncategorizedimages';
16 function sortDescending() {
20 function isExpensive() {
24 function isSyndicated() {
29 $dbr =& wfGetDB( DB_SLAVE
);
30 list( $page, $categorylinks ) = $dbr->tableNamesN( 'page', 'categorylinks' );
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";
39 function formatResult( $skin, $row ) {
41 $title = Title
::makeTitleSafe( NS_IMAGE
, $row->title
);
42 $label = htmlspecialchars( $wgContLang->convert( $title->getText() ) );
43 return $skin->makeKnownLinkObj( $title, $label );
47 function wfSpecialUncategorizedimages() {
48 $uip = new UncategorizedImagesPage();
49 list( $limit, $offset ) = wfCheckLimits();
50 return $uip->doQuery( $offset, $limit );