From: Shane King Date: Wed, 1 Dec 2004 12:23:14 +0000 (+0000) Subject: Added a special page for "uncategorized categories", as requested in bug #687. X-Git-Tag: 1.5.0alpha1~1181 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=cb50abd8ebfcb810d10d906edb13c3db2a37cc53;p=lhc%2Fweb%2Fwiklou.git Added a special page for "uncategorized categories", as requested in bug #687. --- diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 9b9c51efd0..c61c7db17a 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -41,6 +41,7 @@ $wgSpecialPages = array( 'Randompage' => new SpecialPage( 'Randompage' ), 'Lonelypages' => new SpecialPage( 'Lonelypages' ), 'Uncategorizedpages'=> new SpecialPage( 'Uncategorizedpages' ), + 'Uncategorizedcategories'=> new SpecialPage( 'Uncategorizedcategories' ), 'Unusedimages' => new SpecialPage( 'Unusedimages' ) ); diff --git a/includes/SpecialUncategorizedcategories.php b/includes/SpecialUncategorizedcategories.php new file mode 100755 index 0000000000..77afdf2780 --- /dev/null +++ b/includes/SpecialUncategorizedcategories.php @@ -0,0 +1,36 @@ +requestedNamespace = NS_CATEGORY; + + return $lpp->doQuery( $offset, $limit ); +} + +?> \ No newline at end of file diff --git a/includes/SpecialUncategorizedpages.php b/includes/SpecialUncategorizedpages.php index 2d56ce9df6..b8d2cd9bc6 100755 --- a/includes/SpecialUncategorizedpages.php +++ b/includes/SpecialUncategorizedpages.php @@ -16,7 +16,8 @@ require_once( "QueryPage.php" ); * @subpackage SpecialPage */ class UncategorizedPagesPage extends PageQueryPage { - + var $requestedNamespace = 0; + function getName() { return "Uncategorizedpages"; } @@ -36,7 +37,7 @@ class UncategorizedPagesPage extends PageQueryPage { return "SELECT 'Uncategorizedpages' as type, cur_namespace AS namespace, cur_title AS title, cur_title AS value " . "FROM $cur LEFT JOIN $categorylinks ON cur_id=cl_from ". - "WHERE cl_from IS NULL AND cur_namespace=0 AND cur_is_redirect=0"; + "WHERE cl_from IS NULL AND cur_namespace=$this->requestedNamespace AND cur_is_redirect=0"; } } diff --git a/languages/Language.php b/languages/Language.php index f43024f54b..d61d3d504f 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1016,6 +1016,7 @@ That comes to '''$5''' average edits per page, and '''$6''' views per edit.", 'validate' => 'Validate page', 'lonelypages' => 'Orphaned pages', 'uncategorizedpages' => 'Uncategorized pages', +'uncategorizedcategories' => 'Uncategorized categories', 'unusedimages' => 'Unused images', 'popularpages' => 'Popular pages', 'nviews' => '$1 views',