r60418 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60417‎ | r60418 | r60419 >
Date:21:56, 26 December 2009
Author:mrzman
Status:ok
Tags:
Comment:
Per CR on r58079, add a permission check for 'reupload-shared' to
Title::isValidMoveOperation when moving a file over one on a shared repo
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2686,7 +2686,10 @@
26872687 if( !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) {
26882688 $errors[] = array('imagetypemismatch');
26892689 }
 2690+ } elseif( !$wgUser->isAllowed( 'reupload-shared' ) && wfFindFile( $nt ) ) {
 2691+ $errors[] = array( 'file-exists-sharedrepo' );
26902692 }
 2693+
26912694 }
26922695
26932696 if ( $auth ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r60420Fix for r60418, need to check whether the /destination/ file exists...mrzman22:04, 26 December 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58079(bug 18019) Warn users when moving a file to a name in use on a shared repo....mrzman04:36, 24 October 2009

Status & tagging log