From a694396480f5a2e7324beac77e47e49041474c07 Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Wed, 23 Aug 2006 15:26:50 +0000 Subject: [PATCH] (bug 5970) Need to login to upload files This fixes a mistake in the permissions system (which shouldn't be exist), however the actual problem - anonymous users logging - is still exist. --- includes/SpecialUpload.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index 807a8824a9..b6301f1ff8 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -202,13 +202,12 @@ class UploadForm { } # Check permissions - if( $wgUser->isLoggedIn() ) { - if( !$wgUser->isAllowed( 'upload' ) ) { + if( !$wgUser->isAllowed( 'upload' ) ) { + if( !$wgUser->isLoggedIn() ) { + $wgOut->showErrorPage( 'uploadnologin', 'uploadnologintext' ); + } else { $wgOut->permissionRequired( 'upload' ); - return; } - } else { - $wgOut->showErrorPage( 'uploadnologin', 'uploadnologintext' ); return; } -- 2.20.1