https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113315
Revision: 113315
Author: tstarling
Date: 2012-03-07 23:00:42 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
Fix for r113312: explain the bug without the use of commented-out code
Modified Paths:
--------------
trunk/phase3/includes/filerepo/file/LocalFile.php
Modified: trunk/phase3/includes/filerepo/file/LocalFile.php
===================================================================
--- trunk/phase3/includes/filerepo/file/LocalFile.php 2012-03-07 22:55:53 UTC
(rev 113314)
+++ trunk/phase3/includes/filerepo/file/LocalFile.php 2012-03-07 23:00:42 UTC
(rev 113315)
@@ -1017,13 +1017,11 @@
);
if ( $dbw->affectedRows() == 0 ) {
- if ( $oldver == '' ) { // XXX
- # (bug 34993) publish() can displace the
current file and yet fail to save
- # a new one. The next publish attempt will
treat the file as a brand new file
- # and pass an empty $oldver. Allow this bogus
value so we can displace the
- # `image` row to `oldimage`, leaving room for
the new current file `image` row.
- #throw new MWException( "Empty oi_archive_name.
Database and storage out of sync?" );
- }
+ # (bug 34993) Note: $oldver can be empty here, if the
previous
+ # version of the file was broken. Allow registration of
the new
+ # version to continue anyway, because that's better
than having
+ # an image that's not fixable by user operations.
+
$reupload = true;
# Collision, this is an update of a file
# Insert previous contents into oldimage
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs