http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65478
Revision: 65478 Author: catrope Date: 2010-04-23 19:42:48 +0000 (Fri, 23 Apr 2010) Log Message: ----------- * 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 branches/querypage-work2/phase3/includes/SpecialPage.php branches/querypage-work2/phase3/includes/specials/SpecialUnwatchedpages.php Modified: branches/querypage-work2/phase3/includes/QueryPage.php =================================================================== --- branches/querypage-work2/phase3/includes/QueryPage.php 2010-04-23 19:36:37 UTC (rev 65477) +++ branches/querypage-work2/phase3/includes/QueryPage.php 2010-04-23 19:42:48 UTC (rev 65478) @@ -28,7 +28,7 @@ array( 'MostcategoriesPage', 'Mostcategories' ), array( 'MostimagesPage', 'Mostimages' ), array( 'MostlinkedCategoriesPage', 'Mostlinkedcategories' ), - array( 'SpecialMostlinkedtemplates', 'Mostlinkedtemplates' ), + array( 'MostlinkedtemplatesPage', 'Mostlinkedtemplates' ), array( 'MostlinkedPage', 'Mostlinked' ), array( 'MostrevisionsPage', 'Mostrevisions' ), array( 'FewestrevisionsPage', 'Fewestrevisions' ), @@ -388,6 +388,11 @@ */ function execute( $par ) { global $wgUser, $wgOut, $wgLang; + + if ( !$this->userCanExecute( $wgUser ) ) { + $this->displayRestrictionError(); + return; + } if( $this->limit == 0 && $this->offset == 0 ) list( $this->limit, $this->offset ) = wfCheckLimits(); Modified: branches/querypage-work2/phase3/includes/SpecialPage.php =================================================================== --- branches/querypage-work2/phase3/includes/SpecialPage.php 2010-04-23 19:36:37 UTC (rev 65477) +++ branches/querypage-work2/phase3/includes/SpecialPage.php 2010-04-23 19:42:48 UTC (rev 65478) @@ -94,26 +94,26 @@ 'Withoutinterwiki' => array( 'WithoutinterwikiPage' ), 'Protectedpages' => array( 'SpecialPage', 'Protectedpages' ), 'Protectedtitles' => array( 'SpecialPage', 'Protectedtitles' ), - 'Shortpages' => array( 'SpecialPage', 'Shortpages' ), - 'Uncategorizedcategories' => array( 'SpecialPage', 'Uncategorizedcategories' ), - 'Uncategorizedimages' => array( 'SpecialPage', 'Uncategorizedimages' ), - 'Uncategorizedpages' => array( 'SpecialPage', 'Uncategorizedpages' ), - 'Uncategorizedtemplates' => array( 'SpecialPage', 'Uncategorizedtemplates' ), - 'Unusedcategories' => array( 'SpecialPage', 'Unusedcategories' ), - 'Unusedimages' => array( 'SpecialPage', 'Unusedimages' ), - 'Unusedtemplates' => array( 'SpecialPage', 'Unusedtemplates' ), - 'Unwatchedpages' => array( 'SpecialPage', 'Unwatchedpages', 'unwatchedpages' ), - 'Wantedcategories' => array( 'SpecialPage', 'Wantedcategories' ), - 'Wantedfiles' => array( 'SpecialPage', 'Wantedfiles' ), - 'Wantedpages' => array( 'IncludableSpecialPage', 'Wantedpages' ), - 'Wantedtemplates' => array( 'SpecialPage', 'Wantedtemplates' ), + 'Shortpages' => array( 'ShortpagesPage' ), + 'Uncategorizedcategories' => array( 'UncategorizedcategoriesPage' ), + 'Uncategorizedimages' => array( 'UncategorizedimagesPage' ), + 'Uncategorizedpages' => array( 'UncategorizedpagesPage' ), + 'Uncategorizedtemplates' => array( 'UncategorizedtemplatesPage' ), + 'Unusedcategories' => array( 'UnusedcategoriesPage' ), + 'Unusedimages' => array( 'UnusedimagesPage' ), + 'Unusedtemplates' => array( 'UnusedtemplatesPage' ), + 'Unwatchedpages' => array( 'UnwatchedpagesPage' ), + 'Wantedcategories' => array( 'WantedcategoriesPage' ), + 'Wantedfiles' => array( 'WantedfilesPage' ), + 'Wantedpages' => array( 'WantedpagesPage' ), + 'Wantedtemplates' => array( 'WantedtemplatesPage' ), # List of pages 'Allpages' => 'SpecialAllpages', 'Prefixindex' => 'SpecialPrefixindex', 'Categories' => array( 'SpecialPage', 'Categories' ), - 'Disambiguations' => array( 'SpecialPage', 'Disambiguations' ), - 'Listredirects' => array( 'SpecialPage', 'Listredirects' ), + 'Disambiguations' => array( 'DisambiguationsPage' ), + 'Listredirects' => array( 'ListredirectsPage' ), # Login/create account 'Userlogin' => array( 'SpecialPage', 'Userlogin' ), @@ -156,7 +156,7 @@ 'Unlockdb' => array( 'SpecialPage', 'Unlockdb', 'siteadmin' ), # Redirecting special pages - 'LinkSearch' => array( 'SpecialPage', 'LinkSearch' ), + 'LinkSearch' => array( 'LinkSearchPage' ), 'Randompage' => 'Randompage', 'Randomredirect' => 'SpecialRandomredirect', Modified: branches/querypage-work2/phase3/includes/specials/SpecialUnwatchedpages.php =================================================================== --- branches/querypage-work2/phase3/includes/specials/SpecialUnwatchedpages.php 2010-04-23 19:36:37 UTC (rev 65477) +++ branches/querypage-work2/phase3/includes/specials/SpecialUnwatchedpages.php 2010-04-23 19:42:48 UTC (rev 65478) @@ -16,7 +16,7 @@ class UnwatchedpagesPage extends QueryPage { function __construct() { - SpecialPage::__construct( 'Unwatchedpages' ); + SpecialPage::__construct( 'Unwatchedpages', 'unwatchedpages' ); } // inexpensive? @@ -64,4 +64,4 @@ return wfSpecialList( $plink, $wlink ); } -} \ No newline at end of file +} _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs