From 5a143bcbb09c9caada92d00119df2ce8717832d9 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Mon, 11 Jun 2007 07:04:25 +0000 Subject: [PATCH] (bug 8869) Introduce Special:Uncategorizedtemplates [in lieu of a reporting mechanism that allows us to cache multiple results per namespace and offer filtering to the user] --- RELEASE-NOTES | 1 + includes/AutoLoader.php | 1 + includes/QueryPage.php | 1 + includes/SpecialPage.php | 1 + includes/SpecialUncategorizedtemplates.php | 31 ++++++++++++++++++++++ languages/messages/MessagesEn.php | 3 +++ maintenance/language/messageTypes.inc | 1 + maintenance/language/messages.inc | 2 ++ 8 files changed, 41 insertions(+) create mode 100644 includes/SpecialUncategorizedtemplates.php diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e7a30c2064..78ee12e2a6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -80,6 +80,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Use shared.css for all skins and oldshared.css in place of common.css for pre-Monobook skins. As always, modifications should go in-wiki to MediaWiki: Common.css and MediaWiki:Monobook.css. +* (bug 8869) Introduce Special:Uncategorizedtemplates == Bugfixes since 1.10 == diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 7f9a499ccb..3670c9f5dd 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -210,6 +210,7 @@ function __autoload($className) { 'ShortPagesPage' => 'includes/SpecialShortpages.php', 'UncategorizedCategoriesPage' => 'includes/SpecialUncategorizedcategories.php', 'UncategorizedPagesPage' => 'includes/SpecialUncategorizedpages.php', + 'UncategorizedTemplatesPage' => 'includes/SpecialUncategorizedtemplates.php', 'PageArchive' => 'includes/SpecialUndelete.php', 'UndeleteForm' => 'includes/SpecialUndelete.php', 'DBUnlockForm' => 'includes/SpecialUnlockdb.php', diff --git a/includes/QueryPage.php b/includes/QueryPage.php index f7f90d771c..449ec23e41 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -34,6 +34,7 @@ $wgQueryPages = array( array( 'UncategorizedCategoriesPage', 'Uncategorizedcategories' ), array( 'UncategorizedPagesPage', 'Uncategorizedpages' ), array( 'UncategorizedImagesPage', 'Uncategorizedimages' ), + array( 'UncategorizedTemplatesPage', 'Uncategorizedtemplates' ), array( 'UnusedCategoriesPage', 'Unusedcategories' ), array( 'UnusedimagesPage', 'Unusedimages' ), array( 'WantedCategoriesPage', 'Wantedcategories' ), diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 4eff196d9e..a38bc012f6 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -94,6 +94,7 @@ class SpecialPage 'Uncategorizedpages' => array( 'SpecialPage', 'Uncategorizedpages' ), 'Uncategorizedcategories' => array( 'SpecialPage', 'Uncategorizedcategories' ), 'Uncategorizedimages' => array( 'SpecialPage', 'Uncategorizedimages' ), + 'Uncategorizedtemplates' => array( 'SpecialPage', 'Uncategorizedtemplates' ), 'Unusedcategories' => array( 'SpecialPage', 'Unusedcategories' ), 'Unusedimages' => array( 'SpecialPage', 'Unusedimages' ), 'Wantedpages' => array( 'IncludableSpecialPage', 'Wantedpages' ), diff --git a/includes/SpecialUncategorizedtemplates.php b/includes/SpecialUncategorizedtemplates.php new file mode 100644 index 0000000000..6d2d288322 --- /dev/null +++ b/includes/SpecialUncategorizedtemplates.php @@ -0,0 +1,31 @@ + + */ +class UncategorizedTemplatesPage extends UncategorizedPagesPage { + + var $requestedNamespace = NS_TEMPLATE; + + public function getName() { + return 'Uncategorizedtemplates'; + } + +} + +/** + * Main execution point + * + * @param mixed $par Parameter passed to the page + */ +function wfSpecialUncategorizedtemplates() { + list( $limit, $offset ) = wfCheckLimits(); + $utp = new UncategorizedTemplatesPage(); + $utp->doQuery( $offset, $limit ); +} + +?> diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 89b0e68ab0..a3b3873ca1 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -368,6 +368,7 @@ $specialPageAliases = array( 'Uncategorizedpages' => array( 'Uncategorizedpages' ), 'Uncategorizedcategories' => array( 'Uncategorizedcategories' ), 'Uncategorizedimages' => array( 'Uncategorizedimages' ), + 'Uncategorizedtemplates' => array( 'Uncategorizedtemplates' ), 'Unusedcategories' => array( 'Unusedcategories' ), 'Unusedimages' => array( 'Unusedimages' ), 'Wantedpages' => array( 'Wantedpages', 'Brokenlinks' ), @@ -1543,6 +1544,8 @@ The [http://meta.wikimedia.org/wiki/Help:Job_queue job queue] length is '''\$7'' 'uncategorizedcategories-summary' => '', # only translate this message to other languages if you have to change it 'uncategorizedimages' => 'Uncategorized images', 'uncategorizedimages-summary' => '', # only translate this message to other languages if you have to change it +'uncategorizedtemplates' => 'Uncategorized templates', +'uncategorizedtemplates-summary' => '', 'unusedcategories' => 'Unused categories', 'unusedimages' => 'Unused files', 'popularpages' => 'Popular pages', diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 99708094c2..7ec080e61a 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -123,6 +123,7 @@ $wgOptionalMessages = array( 'uncategorizedpages-summary', 'uncategorizedcategories-summary', 'uncategorizedimages-summary', + 'uncategorizedtemplates-summary', 'popularpages-summary', 'wantedcategories-summary', 'wantedpages-summary', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 292ecc1d16..ed6749aaf5 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -939,6 +939,8 @@ $wgMessageStructure = array( 'uncategorizedcategories-summary', 'uncategorizedimages', 'uncategorizedimages-summary', + 'uncategorizedtemplates', + 'uncategorizedtemplates-summary', 'unusedcategories', 'unusedimages', 'popularpages', -- 2.20.1