r65478 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65477‎ | r65478 | r65479 >
Date:19:42, 23 April 2010
Author:catrope
Status:deferred
Tags:
Comment:
* querypage-work2: Correct classes for a bunch of pages in SpecialPage.php
* Correct class name for Mostlinkedtemplates in $wgQueryPages
* Access restriction for Special:Unwatchedpages
Modified paths:
  • /branches/querypage-work2/phase3/includes/QueryPage.php (modified) (history)
  • /branches/querypage-work2/phase3/includes/SpecialPage.php (modified) (history)
  • /branches/querypage-work2/phase3/includes/specials/SpecialUnwatchedpages.php (modified) (history)

Diff [purge]

Index: branches/querypage-work2/phase3/includes/specials/SpecialUnwatchedpages.php
@@ -16,7 +16,7 @@
1717 class UnwatchedpagesPage extends QueryPage {
1818
1919 function __construct() {
20 - SpecialPage::__construct( 'Unwatchedpages' );
 20+ SpecialPage::__construct( 'Unwatchedpages', 'unwatchedpages' );
2121 }
2222
2323 // inexpensive?
@@ -64,4 +64,4 @@
6565
6666 return wfSpecialList( $plink, $wlink );
6767 }
68 -}
\ No newline at end of file
 68+}
Index: branches/querypage-work2/phase3/includes/QueryPage.php
@@ -28,7 +28,7 @@
2929 array( 'MostcategoriesPage', 'Mostcategories' ),
3030 array( 'MostimagesPage', 'Mostimages' ),
3131 array( 'MostlinkedCategoriesPage', 'Mostlinkedcategories' ),
32 - array( 'SpecialMostlinkedtemplates', 'Mostlinkedtemplates' ),
 32+ array( 'MostlinkedtemplatesPage', 'Mostlinkedtemplates' ),
3333 array( 'MostlinkedPage', 'Mostlinked' ),
3434 array( 'MostrevisionsPage', 'Mostrevisions' ),
3535 array( 'FewestrevisionsPage', 'Fewestrevisions' ),
@@ -388,6 +388,11 @@
389389 */
390390 function execute( $par ) {
391391 global $wgUser, $wgOut, $wgLang;
 392+
 393+ if ( !$this->userCanExecute( $wgUser ) ) {
 394+ $this->displayRestrictionError();
 395+ return;
 396+ }
392397
393398 if( $this->limit == 0 && $this->offset == 0 )
394399 list( $this->limit, $this->offset ) = wfCheckLimits();
Index: branches/querypage-work2/phase3/includes/SpecialPage.php
@@ -94,26 +94,26 @@
9595 'Withoutinterwiki' => array( 'WithoutinterwikiPage' ),
9696 'Protectedpages' => array( 'SpecialPage', 'Protectedpages' ),
9797 'Protectedtitles' => array( 'SpecialPage', 'Protectedtitles' ),
98 - 'Shortpages' => array( 'SpecialPage', 'Shortpages' ),
99 - 'Uncategorizedcategories' => array( 'SpecialPage', 'Uncategorizedcategories' ),
100 - 'Uncategorizedimages' => array( 'SpecialPage', 'Uncategorizedimages' ),
101 - 'Uncategorizedpages' => array( 'SpecialPage', 'Uncategorizedpages' ),
102 - 'Uncategorizedtemplates' => array( 'SpecialPage', 'Uncategorizedtemplates' ),
103 - 'Unusedcategories' => array( 'SpecialPage', 'Unusedcategories' ),
104 - 'Unusedimages' => array( 'SpecialPage', 'Unusedimages' ),
105 - 'Unusedtemplates' => array( 'SpecialPage', 'Unusedtemplates' ),
106 - 'Unwatchedpages' => array( 'SpecialPage', 'Unwatchedpages', 'unwatchedpages' ),
107 - 'Wantedcategories' => array( 'SpecialPage', 'Wantedcategories' ),
108 - 'Wantedfiles' => array( 'SpecialPage', 'Wantedfiles' ),
109 - 'Wantedpages' => array( 'IncludableSpecialPage', 'Wantedpages' ),
110 - 'Wantedtemplates' => array( 'SpecialPage', 'Wantedtemplates' ),
 98+ 'Shortpages' => array( 'ShortpagesPage' ),
 99+ 'Uncategorizedcategories' => array( 'UncategorizedcategoriesPage' ),
 100+ 'Uncategorizedimages' => array( 'UncategorizedimagesPage' ),
 101+ 'Uncategorizedpages' => array( 'UncategorizedpagesPage' ),
 102+ 'Uncategorizedtemplates' => array( 'UncategorizedtemplatesPage' ),
 103+ 'Unusedcategories' => array( 'UnusedcategoriesPage' ),
 104+ 'Unusedimages' => array( 'UnusedimagesPage' ),
 105+ 'Unusedtemplates' => array( 'UnusedtemplatesPage' ),
 106+ 'Unwatchedpages' => array( 'UnwatchedpagesPage' ),
 107+ 'Wantedcategories' => array( 'WantedcategoriesPage' ),
 108+ 'Wantedfiles' => array( 'WantedfilesPage' ),
 109+ 'Wantedpages' => array( 'WantedpagesPage' ),
 110+ 'Wantedtemplates' => array( 'WantedtemplatesPage' ),
111111
112112 # List of pages
113113 'Allpages' => 'SpecialAllpages',
114114 'Prefixindex' => 'SpecialPrefixindex',
115115 'Categories' => array( 'SpecialPage', 'Categories' ),
116 - 'Disambiguations' => array( 'SpecialPage', 'Disambiguations' ),
117 - 'Listredirects' => array( 'SpecialPage', 'Listredirects' ),
 116+ 'Disambiguations' => array( 'DisambiguationsPage' ),
 117+ 'Listredirects' => array( 'ListredirectsPage' ),
118118
119119 # Login/create account
120120 'Userlogin' => array( 'SpecialPage', 'Userlogin' ),
@@ -156,7 +156,7 @@
157157 'Unlockdb' => array( 'SpecialPage', 'Unlockdb', 'siteadmin' ),
158158
159159 # Redirecting special pages
160 - 'LinkSearch' => array( 'SpecialPage', 'LinkSearch' ),
 160+ 'LinkSearch' => array( 'LinkSearchPage' ),
161161 'Randompage' => 'Randompage',
162162 'Randomredirect' => 'SpecialRandomredirect',
163163

Status & tagging log