This fixes a mistake in the permissions system (which shouldn't be exist), however the actual problem - anonymous users logging - is still exist.
}
# 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;
}