r30031 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30030‎ | r30031 | r30032 >
Date:19:47, 21 January 2008
Author:aaron
Status:old
Tags:
Comment:
Disallow uploads to protected titles (bug 12727)
Modified paths:
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -435,7 +435,7 @@
436436 * If the image is protected, non-sysop users won't be able
437437 * to modify it by uploading a new revision.
438438 */
439 - if( !$nt->userCan( 'edit' ) ) {
 439+ if( !$nt->userCan( 'edit' ) || !$nt->userCan( 'create' ) ) {
440440 return self::PROTECTED_PAGE;
441441 }
442442

Status & tagging log