r24836 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24835‎ | r24836 | r24837 >
Date:19:52, 15 August 2007
Author:robchurch
Status:old
Tags:
Comment:
(bug 10937) Distinguish overwritten files in upload log; use the `upload/overwrite` action for these
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -694,6 +694,7 @@
695695 return false;
696696 }
697697
 698+ $reupload = false;
698699 if ( $timestamp === false ) {
699700 $timestamp = $dbw->timestamp();
700701 }
@@ -723,6 +724,8 @@
724725 );
725726
726727 if( $dbw->affectedRows() == 0 ) {
 728+ $reupload = true;
 729+
727730 # Collision, this is an update of a file
728731 # Insert previous contents into oldimage
729732 $dbw->insertSelect( 'oldimage', 'image',
@@ -777,7 +780,8 @@
778781
779782 # Add the log entry
780783 $log = new LogPage( 'upload' );
781 - $log->addEntry( 'upload', $descTitle, $comment );
 784+ $action = $reupload ? 'overwrite' : 'upload';
 785+ $log->addEntry( $action, $descTitle, $comment );
782786
783787 if( $descTitle->exists() ) {
784788 # Create a null revision
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2293,6 +2293,7 @@
22942294 'delete/restore' => 'undeletedarticle',
22952295 'delete/revision' => 'revdelete-logentry',
22962296 'upload/upload' => 'uploadedimage',
 2297+ 'upload/overwrite' => 'overwroteimage',
22972298 'upload/revert' => 'uploadedimage',
22982299 'move/move' => '1movedto2',
22992300 'move/move_redir' => '1movedto2_redir',
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1420,6 +1420,7 @@
14211421 'uploadwarning' => 'Upload warning',
14221422 'savefile' => 'Save file',
14231423 'uploadedimage' => 'uploaded "[[$1]]"',
 1424+'overwroteimage' => 'uploaded a new version of "[[$1]]"',
14241425 'uploaddisabled' => 'Uploads disabled',
14251426 'uploaddisabledtext' => 'File uploads are disabled on this wiki.',
14261427 '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 @@
175175 labels for custom restriction levels
176176 * Show edit count in user preferences
177177 * Improved support for audio/video extensions
 178+* (bug 10937) Distinguish overwritten files in upload log
178179
179180 == Bugfixes since 1.10 ==
180181

Follow-up revisions

RevisionCommit summaryAuthorDate
r24866Merged revisions 24755-24865 via svnmerge from...david23:08, 16 August 2007

Status & tagging log