Index: branches/robchurch/reports/includes/SpecialUncategorizedpages.php |
— | — | @@ -1,57 +0,0 @@ |
2 | | -<?php |
3 | | -/** |
4 | | - * |
5 | | - * @addtogroup SpecialPage |
6 | | - */ |
7 | | - |
8 | | -/** |
9 | | - * A special page looking for page without any category. |
10 | | - * @addtogroup SpecialPage |
11 | | - */ |
12 | | -class UncategorizedPagesPage extends PageQueryPage { |
13 | | - var $requestedNamespace = NS_MAIN; |
14 | | - |
15 | | - function getName() { |
16 | | - return "Uncategorizedpages"; |
17 | | - } |
18 | | - |
19 | | - function sortDescending() { |
20 | | - return false; |
21 | | - } |
22 | | - |
23 | | - function isExpensive() { |
24 | | - return true; |
25 | | - } |
26 | | - function isSyndicated() { return false; } |
27 | | - |
28 | | - function getSQL() { |
29 | | - $dbr = wfGetDB( DB_SLAVE ); |
30 | | - list( $page, $categorylinks ) = $dbr->tableNamesN( 'page', 'categorylinks' ); |
31 | | - $name = $dbr->addQuotes( $this->getName() ); |
32 | | - |
33 | | - return |
34 | | - " |
35 | | - SELECT |
36 | | - $name as type, |
37 | | - page_namespace AS namespace, |
38 | | - page_title AS title, |
39 | | - page_title AS value |
40 | | - FROM $page |
41 | | - LEFT JOIN $categorylinks ON page_id=cl_from |
42 | | - WHERE cl_from IS NULL AND page_namespace={$this->requestedNamespace} AND page_is_redirect=0 |
43 | | - "; |
44 | | - } |
45 | | -} |
46 | | - |
47 | | -/** |
48 | | - * constructor |
49 | | - */ |
50 | | -function wfSpecialUncategorizedpages() { |
51 | | - list( $limit, $offset ) = wfCheckLimits(); |
52 | | - |
53 | | - $lpp = new UncategorizedPagesPage(); |
54 | | - |
55 | | - return $lpp->doQuery( $offset, $limit ); |
56 | | -} |
57 | | - |
58 | | -?> |
Index: branches/robchurch/reports/includes/SpecialUncategorizedtemplates.php |
— | — | @@ -1,31 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -/** |
5 | | - * Special page lists all uncategorised pages in the |
6 | | - * template namespace |
7 | | - * |
8 | | - * @addtogroup SpecialPage |
9 | | - * @author Rob Church <robchur@gmail.com> |
10 | | - */ |
11 | | -class UncategorizedTemplatesPage extends UncategorizedPagesPage { |
12 | | - |
13 | | - var $requestedNamespace = NS_TEMPLATE; |
14 | | - |
15 | | - public function getName() { |
16 | | - return 'Uncategorizedtemplates'; |
17 | | - } |
18 | | - |
19 | | -} |
20 | | - |
21 | | -/** |
22 | | - * Main execution point |
23 | | - * |
24 | | - * @param mixed $par Parameter passed to the page |
25 | | - */ |
26 | | -function wfSpecialUncategorizedtemplates() { |
27 | | - list( $limit, $offset ) = wfCheckLimits(); |
28 | | - $utp = new UncategorizedTemplatesPage(); |
29 | | - $utp->doQuery( $offset, $limit ); |
30 | | -} |
31 | | - |
32 | | -?> |
Index: branches/robchurch/reports/includes/SpecialUncategorizedimages.php |
— | — | @@ -1,47 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -/** |
5 | | - * Special page lists images which haven't been categorised |
6 | | - * |
7 | | - * @addtogroup SpecialPage |
8 | | - * @author Rob Church <robchur@gmail.com> |
9 | | - */ |
10 | | - |
11 | | -class UncategorizedImagesPage extends ImageQueryPage { |
12 | | - |
13 | | - function getName() { |
14 | | - return 'Uncategorizedimages'; |
15 | | - } |
16 | | - |
17 | | - function sortDescending() { |
18 | | - return false; |
19 | | - } |
20 | | - |
21 | | - function isExpensive() { |
22 | | - return true; |
23 | | - } |
24 | | - |
25 | | - function isSyndicated() { |
26 | | - return false; |
27 | | - } |
28 | | - |
29 | | - function getSQL() { |
30 | | - $dbr = wfGetDB( DB_SLAVE ); |
31 | | - list( $page, $categorylinks ) = $dbr->tableNamesN( 'page', 'categorylinks' ); |
32 | | - $ns = NS_IMAGE; |
33 | | - |
34 | | - return "SELECT 'Uncategorizedimages' AS type, page_namespace AS namespace, |
35 | | - page_title AS title, page_title AS value |
36 | | - FROM {$page} LEFT JOIN {$categorylinks} ON page_id = cl_from |
37 | | - WHERE cl_from IS NULL AND page_namespace = {$ns} AND page_is_redirect = 0"; |
38 | | - } |
39 | | - |
40 | | -} |
41 | | - |
42 | | -function wfSpecialUncategorizedimages() { |
43 | | - $uip = new UncategorizedImagesPage(); |
44 | | - list( $limit, $offset ) = wfCheckLimits(); |
45 | | - return $uip->doQuery( $offset, $limit ); |
46 | | -} |
47 | | - |
48 | | -?> |
Index: branches/robchurch/reports/includes/SpecialUncategorizedcategories.php |
— | — | @@ -1,37 +0,0 @@ |
2 | | -<?php |
3 | | -/** |
4 | | - * |
5 | | - * @addtogroup SpecialPage |
6 | | - */ |
7 | | - |
8 | | -/** |
9 | | - * |
10 | | - */ |
11 | | -require_once( "SpecialUncategorizedpages.php" ); |
12 | | - |
13 | | -/** |
14 | | - * implements Special:Uncategorizedcategories |
15 | | - * @addtogroup SpecialPage |
16 | | - */ |
17 | | -class UncategorizedCategoriesPage extends UncategorizedPagesPage { |
18 | | - function UncategorizedCategoriesPage() { |
19 | | - $this->requestedNamespace = NS_CATEGORY; |
20 | | - } |
21 | | - |
22 | | - function getName() { |
23 | | - return "Uncategorizedcategories"; |
24 | | - } |
25 | | -} |
26 | | - |
27 | | -/** |
28 | | - * constructor |
29 | | - */ |
30 | | -function wfSpecialUncategorizedcategories() { |
31 | | - list( $limit, $offset ) = wfCheckLimits(); |
32 | | - |
33 | | - $lpp = new UncategorizedCategoriesPage(); |
34 | | - |
35 | | - return $lpp->doQuery( $offset, $limit ); |
36 | | -} |
37 | | - |
38 | | -?> |
Index: branches/robchurch/reports/includes/SpecialRedirect.php |
— | — | @@ -0,0 +1,49 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Special page which redirects the user to a |
| 6 | + * different special page, appending a set |
| 7 | + * request string |
| 8 | + * |
| 9 | + * @addtogroup SpecialPage |
| 10 | + * @author Rob Church <robchur@gmail.com> |
| 11 | + */ |
| 12 | +class SpecialRedirect extends UnlistedSpecialPage { |
| 13 | + |
| 14 | + /** |
| 15 | + * Target |
| 16 | + */ |
| 17 | + private $target = null; |
| 18 | + |
| 19 | + /** |
| 20 | + * Request string components |
| 21 | + */ |
| 22 | + private $request = array(); |
| 23 | + |
| 24 | + /** |
| 25 | + * Constructor |
| 26 | + * |
| 27 | + * @param string $name |
| 28 | + * @param array $request |
| 29 | + */ |
| 30 | + public function __construct( $target, $request ) { |
| 31 | + parent::__construct( $target ); |
| 32 | + $this->target = SpecialPage::getTitleFor( $target ); |
| 33 | + $this->request = $request; |
| 34 | + } |
| 35 | + |
| 36 | + /** |
| 37 | + * Main execution function |
| 38 | + */ |
| 39 | + public function execute( $par = false ) { |
| 40 | + global $wgOut; |
| 41 | + $q = array(); |
| 42 | + foreach( $this->request as $name => $value ) |
| 43 | + $q[] = $name . '=' . $value; |
| 44 | + $q = implode( '&', $q ); |
| 45 | + $wgOut->redirect( $this->target->getFullUrl( $q ) ); |
| 46 | + } |
| 47 | + |
| 48 | +} |
| 49 | + |
| 50 | +?> |
\ No newline at end of file |
Property changes on: branches/robchurch/reports/includes/SpecialRedirect.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 51 | + native |
Index: branches/robchurch/reports/includes/AutoLoader.php |
— | — | @@ -202,6 +202,7 @@ |
203 | 203 | 'SpecialPage' => 'includes/SpecialPage.php', |
204 | 204 | 'UnlistedSpecialPage' => 'includes/SpecialPage.php', |
205 | 205 | 'IncludableSpecialPage' => 'includes/SpecialPage.php', |
| 206 | + 'SpecialRedirect' => 'includes/SpecialRedirect.php', |
206 | 207 | 'SpecialSpecialPages' => 'includes/SpecialSpecialpages.php', |
207 | 208 | 'PopularPagesPage' => 'includes/SpecialPopularpages.php', |
208 | 209 | 'PreferencesForm' => 'includes/SpecialPreferences.php', |
— | — | @@ -210,9 +211,6 @@ |
211 | 212 | 'RevisionDeleteForm' => 'includes/SpecialRevisiondelete.php', |
212 | 213 | 'RevisionDeleter' => 'includes/SpecialRevisiondelete.php', |
213 | 214 | 'SpecialSearch' => 'includes/SpecialSearch.php', |
214 | | - 'UncategorizedCategoriesPage' => 'includes/SpecialUncategorizedcategories.php', |
215 | | - 'UncategorizedPagesPage' => 'includes/SpecialUncategorizedpages.php', |
216 | | - 'UncategorizedTemplatesPage' => 'includes/SpecialUncategorizedtemplates.php', |
217 | 215 | 'PageArchive' => 'includes/SpecialUndelete.php', |
218 | 216 | 'UndeleteForm' => 'includes/SpecialUndelete.php', |
219 | 217 | 'DBUnlockForm' => 'includes/SpecialUnlockdb.php', |
Index: branches/robchurch/reports/includes/QueryPage.php |
— | — | @@ -29,12 +29,6 @@ |
30 | 30 | array( 'MostrevisionsPage', 'Mostrevisions' ), |
31 | 31 | array( 'FewestrevisionsPage', 'Fewestrevisions' ), |
32 | 32 | array( 'NewPagesPage', 'Newpages' ), |
33 | | - # |
34 | | - array( 'UncategorizedCategoriesPage', 'Uncategorizedcategories' ), |
35 | | - array( 'UncategorizedPagesPage', 'Uncategorizedpages' ), |
36 | | - array( 'UncategorizedImagesPage', 'Uncategorizedimages' ), |
37 | | - array( 'UncategorizedTemplatesPage', 'Uncategorizedtemplates' ), |
38 | | - # |
39 | 33 | array( 'UnusedCategoriesPage', 'Unusedcategories' ), |
40 | 34 | array( 'UnusedimagesPage', 'Unusedimages' ), |
41 | 35 | array( 'WantedCategoriesPage', 'Wantedcategories' ), |
Index: branches/robchurch/reports/includes/SpecialPage.php |
— | — | @@ -92,9 +92,9 @@ |
93 | 93 | 'Randompage' => array( 'SpecialPage', 'Randompage' ), |
94 | 94 | 'Lonelypages' => array( 'SpecialPage', 'Lonelypages' ), |
95 | 95 | 'Uncategorizedpages' => 'UncategorisedPagesReport', |
96 | | - 'Uncategorizedcategories' => array( 'SpecialPage', 'Uncategorizedcategories' ), |
97 | | - 'Uncategorizedimages' => array( 'SpecialPage', 'Uncategorizedimages' ), |
98 | | - 'Uncategorizedtemplates' => array( 'SpecialPage', 'Uncategorizedtemplates' ), |
| 96 | + 'Uncategorizedcategories' => array( 'SpecialRedirect', 'Uncategorizedpages', array( 'namespace' => NS_CATEGORY ) ), |
| 97 | + 'Uncategorizedimages' => array( 'SpecialRedirect', 'Uncategorizedpages', array( 'namespace' => NS_IMAGE ) ), |
| 98 | + 'Uncategorizedtemplates' => array( 'SpecialRedirect', 'Uncategorizedpages', array( 'namespace' => NS_TEMPLATE ) ), |
99 | 99 | 'Unusedcategories' => array( 'SpecialPage', 'Unusedcategories' ), |
100 | 100 | 'Unusedimages' => array( 'SpecialPage', 'Unusedimages' ), |
101 | 101 | 'Wantedpages' => array( 'IncludableSpecialPage', 'Wantedpages' ), |
Index: branches/robchurch/reports/languages/messages/MessagesEn.php |
— | — | @@ -1593,7 +1593,9 @@ |
1594 | 1594 | 'rclsub' => '(to pages linked from "$1")', |
1595 | 1595 | 'newpages' => 'New pages', |
1596 | 1596 | 'newpages-summary' => '', # only translate this message to other languages if you have to change it |
| 1597 | +'newpages-legend' => 'Find new pages', |
1597 | 1598 | 'newpages-username' => 'Username:', |
| 1599 | +'newpages-no-results' => 'There are no new pages matching the selected criteria.', |
1598 | 1600 | 'ancientpages' => 'Oldest pages', |
1599 | 1601 | 'ancientpages-summary' => '', # only translate this message to other languages if you have to change it |
1600 | 1602 | 'intl' => 'Interlanguage links', |
— | — | @@ -2842,6 +2844,12 @@ |
2843 | 2845 | 'imgmultigotopost' => '', # only translate this message to other languages if you have to change it |
2844 | 2846 | 'imgmultiparseerror' => 'The image file appears to be corrupted or incorrect, so {{SITENAME}} cannot retrieve a list of pages.', |
2845 | 2847 | |
| 2848 | +# General-purpose pager links |
| 2849 | +'paging-next' => 'next', |
| 2850 | +'paging-prev' => 'previous', |
| 2851 | +'paging-first' => 'first', |
| 2852 | +'paging-last' => 'last', |
| 2853 | + |
2846 | 2854 | # Table pager |
2847 | 2855 | 'ascending_abbrev' => 'asc', |
2848 | 2856 | 'descending_abbrev' => 'desc', |