From: Rotem Liss Date: Wed, 23 Aug 2006 15:26:50 +0000 (+0000) Subject: (bug 5970) Need to login to upload files X-Git-Tag: 1.31.0-rc.0~55917 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=a694396480f5a2e7324beac77e47e49041474c07;p=lhc%2Fweb%2Fwiklou.git (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. --- 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; }