Index: trunk/phase3/includes/filerepo/file/LocalFile.php |
— | — | @@ -1017,13 +1017,11 @@ |
1018 | 1018 | ); |
1019 | 1019 | |
1020 | 1020 | if ( $dbw->affectedRows() == 0 ) { |
1021 | | - if ( $oldver == '' ) { // XXX |
1022 | | - # (bug 34993) publish() can displace the current file and yet fail to save |
1023 | | - # a new one. The next publish attempt will treat the file as a brand new file |
1024 | | - # and pass an empty $oldver. Allow this bogus value so we can displace the |
1025 | | - # `image` row to `oldimage`, leaving room for the new current file `image` row. |
1026 | | - #throw new MWException( "Empty oi_archive_name. Database and storage out of sync?" ); |
1027 | | - } |
| 1021 | + # (bug 34993) Note: $oldver can be empty here, if the previous |
| 1022 | + # version of the file was broken. Allow registration of the new |
| 1023 | + # version to continue anyway, because that's better than having |
| 1024 | + # an image that's not fixable by user operations. |
| 1025 | + |
1028 | 1026 | $reupload = true; |
1029 | 1027 | # Collision, this is an update of a file |
1030 | 1028 | # Insert previous contents into oldimage |