* (bug 6300) Bug fixes for sr: variants
* namespaceDupes.php can now accept an arbitrary prefix, for checking rogue
interwikis and such. Not yet fully automated.
-
+* (bug 6344) Add Special:Uncategorizedimages page
== Compatibility ==
array( 'ShortPagesPage', 'Shortpages' ),
array( 'UncategorizedCategoriesPage', 'Uncategorizedcategories' ),
array( 'UncategorizedPagesPage', 'Uncategorizedpages' ),
+ array( 'UncategorizedImagesPage', 'Uncategorizedimages' ),
array( 'UnusedCategoriesPage', 'Unusedcategories' ),
array( 'UnusedimagesPage', 'Unusedimages' ),
array( 'WantedCategoriesPage', 'Wantedcategories' ),
'Lonelypages' => new SpecialPage( 'Lonelypages' ),
'Uncategorizedpages'=> new SpecialPage( 'Uncategorizedpages' ),
'Uncategorizedcategories'=> new SpecialPage( 'Uncategorizedcategories' ),
+ 'Uncategorizedimages' => new SpecialPage( 'Uncategorizedimages' ),
'Unusedcategories' => new SpecialPage( 'Unusedcategories' ),
'Unusedimages' => new SpecialPage( 'Unusedimages' ),
'Wantedpages' => new IncludableSpecialPage( 'Wantedpages' ),
--- /dev/null
+<?php
+
+/**
+ * Special page lists images which haven't been categorised
+ *
+ * @package MediaWiki
+ * @subpackage Special pages
+ * @author Rob Church <robchur@gmail.com>
+ */
+
+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 );
+}
+
+?>
'lonelypages' => 'Orphaned pages',
'uncategorizedpages' => 'Uncategorized pages',
'uncategorizedcategories' => 'Uncategorized categories',
+'uncategorizedimages' => 'Uncategorized images',
'unusedcategories' => 'Unused categories',
'unusedimages' => 'Unused files',
'popularpages' => 'Popular pages',