Index: trunk/phase3/includes/filerepo/LocalFile.php |
— | — | @@ -694,6 +694,7 @@ |
695 | 695 | return false; |
696 | 696 | } |
697 | 697 | |
| 698 | + $reupload = false; |
698 | 699 | if ( $timestamp === false ) { |
699 | 700 | $timestamp = $dbw->timestamp(); |
700 | 701 | } |
— | — | @@ -723,6 +724,8 @@ |
724 | 725 | ); |
725 | 726 | |
726 | 727 | if( $dbw->affectedRows() == 0 ) { |
| 728 | + $reupload = true; |
| 729 | + |
727 | 730 | # Collision, this is an update of a file |
728 | 731 | # Insert previous contents into oldimage |
729 | 732 | $dbw->insertSelect( 'oldimage', 'image', |
— | — | @@ -777,7 +780,8 @@ |
778 | 781 | |
779 | 782 | # Add the log entry |
780 | 783 | $log = new LogPage( 'upload' ); |
781 | | - $log->addEntry( 'upload', $descTitle, $comment ); |
| 784 | + $action = $reupload ? 'overwrite' : 'upload'; |
| 785 | + $log->addEntry( $action, $descTitle, $comment ); |
782 | 786 | |
783 | 787 | if( $descTitle->exists() ) { |
784 | 788 | # Create a null revision |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -2293,6 +2293,7 @@ |
2294 | 2294 | 'delete/restore' => 'undeletedarticle', |
2295 | 2295 | 'delete/revision' => 'revdelete-logentry', |
2296 | 2296 | 'upload/upload' => 'uploadedimage', |
| 2297 | + 'upload/overwrite' => 'overwroteimage', |
2297 | 2298 | 'upload/revert' => 'uploadedimage', |
2298 | 2299 | 'move/move' => '1movedto2', |
2299 | 2300 | 'move/move_redir' => '1movedto2_redir', |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1420,6 +1420,7 @@ |
1421 | 1421 | 'uploadwarning' => 'Upload warning', |
1422 | 1422 | 'savefile' => 'Save file', |
1423 | 1423 | 'uploadedimage' => 'uploaded "[[$1]]"', |
| 1424 | +'overwroteimage' => 'uploaded a new version of "[[$1]]"', |
1424 | 1425 | 'uploaddisabled' => 'Uploads disabled', |
1425 | 1426 | 'uploaddisabledtext' => 'File uploads are disabled on this wiki.', |
1426 | 1427 | 'uploadscripted' => 'This file contains HTML or script code that may be erroneously be interpreted by a web browser.', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -174,6 +174,7 @@ |
175 | 175 | labels for custom restriction levels |
176 | 176 | * Show edit count in user preferences |
177 | 177 | * Improved support for audio/video extensions |
| 178 | +* (bug 10937) Distinguish overwritten files in upload log |
178 | 179 | |
179 | 180 | == Bugfixes since 1.10 == |
180 | 181 | |