summaryrefslogtreecommitdiff
path: root/includes/SpecialUnusedtemplates.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-12-15 18:02:47 +0100
committerPierre Schmitz <pierre@archlinux.de>2008-12-15 18:02:47 +0100
commit396b28f3d881f5debd888ba9bb9b47c2d478a76f (patch)
tree10d6e1a721ee4ef69def34a57f02d7eb3fc9e31e /includes/SpecialUnusedtemplates.php
parent0be4d3ccf6c4fe98a72704f9463ecdea2ee5e615 (diff)
update to Mediawiki 1.13.3; some cleanups
Diffstat (limited to 'includes/SpecialUnusedtemplates.php')
-rw-r--r--includes/SpecialUnusedtemplates.php51
1 files changed, 0 insertions, 51 deletions
diff --git a/includes/SpecialUnusedtemplates.php b/includes/SpecialUnusedtemplates.php
deleted file mode 100644
index 79e99f3a..00000000
--- a/includes/SpecialUnusedtemplates.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-/**
- * implements Special:Unusedtemplates
- * @author Rob Church <robchur@gmail.com>
- * @copyright © 2006 Rob Church
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @addtogroup SpecialPage
- */
-class UnusedtemplatesPage extends QueryPage {
-
- function getName() { return( 'Unusedtemplates' ); }
- function isExpensive() { return true; }
- function isSyndicated() { return false; }
- function sortDescending() { return false; }
-
- function getSQL() {
- $dbr = wfGetDB( DB_SLAVE );
- list( $page, $templatelinks) = $dbr->tableNamesN( 'page', 'templatelinks' );
- $sql = "SELECT 'Unusedtemplates' AS type, page_title AS title,
- page_namespace AS namespace, 0 AS value
- FROM $page
- LEFT JOIN $templatelinks
- ON page_namespace = tl_namespace AND page_title = tl_title
- WHERE page_namespace = 10 AND tl_from IS NULL";
- return $sql;
- }
-
- function formatResult( $skin, $result ) {
- $title = Title::makeTitle( NS_TEMPLATE, $result->title );
- $pageLink = $skin->makeKnownLinkObj( $title, '', 'redirect=no' );
- $wlhLink = $skin->makeKnownLinkObj(
- SpecialPage::getTitleFor( 'Whatlinkshere' ),
- wfMsgHtml( 'unusedtemplateswlh' ),
- 'target=' . $title->getPrefixedUrl() );
- return wfSpecialList( $pageLink, $wlhLink );
- }
-
- function getPageHeader() {
- return wfMsgExt( 'unusedtemplatestext', array( 'parse' ) );
- }
-
-}
-
-function wfSpecialUnusedtemplates() {
- list( $limit, $offset ) = wfCheckLimits();
- $utp = new UnusedtemplatesPage();
- $utp->doQuery( $offset, $limit );
-}
-
-