Index: branches/robchurch/reports/includes/SpecialListredirects.php |
— | — | @@ -1,65 +0,0 @@ |
2 | | -<?php |
3 | | -/** |
4 | | - * @addtogroup SpecialPage |
5 | | - * |
6 | | - * @author Rob Church <robchur@gmail.com> |
7 | | - * @copyright © 2006 Rob Church |
8 | | - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
9 | | - */ |
10 | | - |
11 | | -/** |
12 | | - * Special:Listredirects - Lists all the redirects on the wiki. |
13 | | - * @addtogroup SpecialPage |
14 | | - */ |
15 | | -class ListredirectsPage extends QueryPage { |
16 | | - |
17 | | - function getName() { return( 'Listredirects' ); } |
18 | | - function isExpensive() { return( true ); } |
19 | | - function isSyndicated() { return( false ); } |
20 | | - function sortDescending() { return( false ); } |
21 | | - |
22 | | - function getSQL() { |
23 | | - $dbr = wfGetDB( DB_SLAVE ); |
24 | | - $page = $dbr->tableName( 'page' ); |
25 | | - $sql = "SELECT 'Listredirects' AS type, page_title AS title, page_namespace AS namespace, 0 AS value FROM $page WHERE page_is_redirect = 1"; |
26 | | - return( $sql ); |
27 | | - } |
28 | | - |
29 | | - function formatResult( $skin, $result ) { |
30 | | - global $wgContLang; |
31 | | - |
32 | | - # Make a link to the redirect itself |
33 | | - $rd_title = Title::makeTitle( $result->namespace, $result->title ); |
34 | | - $arr = $wgContLang->getArrow() . $wgContLang->getDirMark(); |
35 | | - $rd_link = $skin->makeKnownLinkObj( $rd_title, '', 'redirect=no' ); |
36 | | - |
37 | | - # Find out where the redirect leads |
38 | | - $revision = Revision::newFromTitle( $rd_title ); |
39 | | - if( $revision ) { |
40 | | - # Make a link to the destination page |
41 | | - $target = Title::newFromRedirect( $revision->getText() ); |
42 | | - if( $target ) { |
43 | | - $targetLink = $skin->makeLinkObj( $target ); |
44 | | - } else { |
45 | | - /** @todo Put in some decent error display here */ |
46 | | - $targetLink = '*'; |
47 | | - } |
48 | | - } else { |
49 | | - /** @todo Put in some decent error display here */ |
50 | | - $targetLink = '*'; |
51 | | - } |
52 | | - |
53 | | - # Format the whole thing and return it |
54 | | - return "$rd_link $arr $targetLink"; |
55 | | - |
56 | | - } |
57 | | - |
58 | | -} |
59 | | - |
60 | | -function wfSpecialListredirects() { |
61 | | - list( $limit, $offset ) = wfCheckLimits(); |
62 | | - $lrp = new ListredirectsPage(); |
63 | | - $lrp->doQuery( $offset, $limit ); |
64 | | -} |
65 | | - |
66 | | -?> |
Index: branches/robchurch/reports/includes/AutoLoader.php |
— | — | @@ -182,7 +182,6 @@ |
183 | 183 | 'ImportStringSource' => 'includes/SpecialImport.php', |
184 | 184 | 'ImportStreamSource' => 'includes/SpecialImport.php', |
185 | 185 | 'IPUnblockForm' => 'includes/SpecialIpblocklist.php', |
186 | | - 'ListredirectsPage' => 'includes/SpecialListredirects.php', |
187 | 186 | 'DBLockForm' => 'includes/SpecialLockdb.php', |
188 | 187 | 'LogReader' => 'includes/SpecialLog.php', |
189 | 188 | 'LogViewer' => 'includes/SpecialLog.php', |
Index: branches/robchurch/reports/includes/QueryPage.php |
— | — | @@ -19,7 +19,6 @@ |
20 | 20 | array( 'DeadendPagesPage', 'Deadendpages' ), |
21 | 21 | array( 'DisambiguationsPage', 'Disambiguations' ), |
22 | 22 | array( 'DoubleRedirectsPage', 'DoubleRedirects' ), |
23 | | - array( 'ListredirectsPage', 'Listredirects' ), |
24 | 23 | array( 'LonelyPagesPage', 'Lonelypages' ), |
25 | 24 | array( 'LongPagesPage', 'Longpages' ), |
26 | 25 | array( 'MostcategoriesPage', 'Mostcategories' ), |