From 2461ed53e38bbed3297f6557d414c9073c9302c9 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 22 Aug 2007 13:22:23 +0000 Subject: [PATCH] (bug 11023) Don't register Special:Upload as a special page when uploads are disabled --- RELEASE-NOTES | 2 ++ includes/SpecialPage.php | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 619c4ef7ec..31b92ac94b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -185,6 +185,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 9002) Provide a "view/restore deleted edits" link on Special:Upload when a destination filename is provided that corresponds with previous deleted files +* (bug 11023) Don't register Special:Upload as a special page when uploads are + disabled == Bugfixes since 1.10 == diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 89fd15bb78..1e83260a59 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -84,7 +84,6 @@ class SpecialPage 'Watchlist' => array( 'SpecialPage', 'Watchlist' ), 'Recentchanges' => array( 'IncludableSpecialPage', 'Recentchanges' ), - 'Upload' => array( 'SpecialPage', 'Upload' ), 'Imagelist' => array( 'SpecialPage', 'Imagelist' ), 'Newimages' => array( 'IncludableSpecialPage', 'Newimages' ), 'Listusers' => array( 'SpecialPage', 'Listusers' ), @@ -160,7 +159,7 @@ class SpecialPage */ static function initList() { global $wgSpecialPages; - global $wgDisableCounters, $wgDisableInternalSearch, $wgEmailAuthentication; + global $wgDisableCounters, $wgDisableInternalSearch, $wgEmailAuthentication, $wgEnableUploads; if ( self::$mListInitialised ) { return; @@ -182,6 +181,10 @@ class SpecialPage self::$mList['Confirmemail'] = 'EmailConfirmation'; } + if( $wgEnableUploads ) { + self::$mList['Upload'] = array( 'SpecialPage', 'Upload' ); + } + # Add extension special pages self::$mList = array_merge( self::$mList, $wgSpecialPages ); -- 2.20.1