Revert r46417 "Skip dupe warnings when it's a titles are the same and it's a reupload."
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 28 Jan 2009 04:28:18 +0000 (04:28 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 28 Jan 2009 04:28:18 +0000 (04:28 +0000)
Notice: Undefined property: UploadForm::$mIsReUpload in /Library/WebServer/Documents/trunk/includes/specials/SpecialUpload.php on line 771

RELEASE-NOTES
includes/specials/SpecialUpload.php

index d56ddd5..2e70162 100644 (file)
@@ -106,8 +106,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 15391) catch DBQueryErrors on external storage insertion. This avoids error 
   messages on save were the edit in fact is saved.
 * (bug 17184) Remove duplicate "z" accesskey in MonoBook
-* Remove redundant dupe warnings on reupload for the same title. Dupe warnings
-  for identical files at different titles are still given.
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index 0608278..207f44e 100644 (file)
@@ -550,7 +550,7 @@ class UploadForm {
                                $warning .= self::getExistsWarning( $this->mLocalFile );
                        }
                        
-                       $warning .= $this->getDupeWarning( $this->mTempPath, $finalExt, $nt );
+                       $warning .= $this->getDupeWarning( $this->mTempPath, $finalExt );
                        
                        if( $warning != '' ) {
                                /**
@@ -757,7 +757,7 @@ class UploadForm {
         * Check for duplicate files and throw up a warning before the upload
         * completes.
         */
-       function getDupeWarning( $tempfile, $extension, $destinationTitle ) {
+       function getDupeWarning( $tempfile, $extension ) {
                $hash = File::sha1Base36( $tempfile );
                $dupes = RepoGroup::singleton()->findBySha1( $hash );
                $archivedImage = new ArchivedFile( null, 0, $hash.".$extension" );
@@ -766,12 +766,8 @@ class UploadForm {
                        $msg = "<gallery>";
                        foreach( $dupes as $file ) {
                                $title = $file->getTitle();
-                               # Don't throw the warning when the titles are the same, it's a reupload
-                               # and highly redundant.
-                               if ( !$title->equals( $destinationTitle ) || !$this->mIsReUpload ) {
-                                       $msg .= $title->getPrefixedText() .
-                                               "|" . $title->getText() . "\n";
-                               }
+                               $msg .= $title->getPrefixedText() .
+                                       "|" . $title->getText() . "\n";
                        }
                        $msg .= "</gallery>";
                        return "<li>" .