Disallow uploads to protected titles (bug 12727)
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 21 Jan 2008 19:47:51 +0000 (19:47 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 21 Jan 2008 19:47:51 +0000 (19:47 +0000)
includes/SpecialUpload.php

index 76f926f..657a1a5 100644 (file)
@@ -435,7 +435,7 @@ class UploadForm {
                 * If the image is protected, non-sysop users won't be able
                 * to modify it by uploading a new revision.
                 */
-               if( !$nt->userCan( 'edit' ) ) {
+               if( !$nt->userCan( 'edit' ) || !$nt->userCan( 'create' ) ) {
                        return self::PROTECTED_PAGE;
                }