From 183851b06bd6c52f3cae5375f433da720d410447 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 11 Oct 2006 18:12:39 +0000 Subject: MediaWiki 1.7.1 wiederhergestellt --- includes/SpecialUncategorizedimages.php | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 includes/SpecialUncategorizedimages.php (limited to 'includes/SpecialUncategorizedimages.php') diff --git a/includes/SpecialUncategorizedimages.php b/includes/SpecialUncategorizedimages.php new file mode 100644 index 00000000..38156976 --- /dev/null +++ b/includes/SpecialUncategorizedimages.php @@ -0,0 +1,55 @@ + + */ + +class UncategorizedImagesPage extends QueryPage { + + function getName() { + return 'Uncategorizedimages'; + } + + function sortDescending() { + return false; + } + + function isExpensive() { + return true; + } + + function isSyndicated() { + return false; + } + + function getSQL() { + $dbr =& wfGetDB( DB_SLAVE ); + extract( $dbr->tableNames( 'page', 'categorylinks' ) ); + $ns = NS_IMAGE; + + return "SELECT 'Uncategorizedimages' AS type, page_namespace AS namespace, + page_title AS title, page_title AS value + FROM {$page} LEFT JOIN {$categorylinks} ON page_id = cl_from + WHERE cl_from IS NULL AND page_namespace = {$ns} AND page_is_redirect = 0"; + } + + function formatResult( &$skin, $row ) { + global $wgContLang; + $title = Title::makeTitleSafe( NS_IMAGE, $row->title ); + $label = htmlspecialchars( $wgContLang->convert( $title->getText() ) ); + return $skin->makeKnownLinkObj( $title, $label ); + } + +} + +function wfSpecialUncategorizedimages() { + $uip = new UncategorizedImagesPage(); + list( $limit, $offset ) = wfCheckLimits(); + return $uip->doQuery( $offset, $limit ); +} + +?> -- cgit v1.2.2