4 * Special page lists images which haven't been categorised
7 * @subpackage Special pages
8 * @author Rob Church <robchur@gmail.com>
11 class UncategorizedImagesPage
extends QueryPage
{
14 return 'Uncategorizedimages';
17 function sortDescending() {
21 function isExpensive() {
25 function isSyndicated() {
30 $dbr =& wfGetDB( DB_SLAVE
);
31 extract( $dbr->tableNames( 'page', 'categorylinks' ) );
34 return "SELECT 'Uncategorizedimages' AS type, page_namespace AS namespace,
35 page_title AS title, page_title AS value
36 FROM {$page} LEFT JOIN {$categorylinks} ON page_id = cl_from
37 WHERE cl_from IS NULL AND page_namespace = {$ns} AND page_is_redirect = 0";
40 function formatResult( &$skin, $row ) {
42 $title = Title
::makeTitleSafe( NS_IMAGE
, $row->title
);
43 $label = htmlspecialchars( $wgContLang->convert( $title->getText() ) );
44 return $skin->makeKnownLinkObj( $title, $label );
49 function wfSpecialUncategorizedimages() {
50 $uip = new UncategorizedImagesPage();
51 list( $limit, $offset ) = wfCheckLimits();
52 return $uip->doQuery( $offset, $limit );