(bug 15811) Also remove license template cruft on re-upload
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 28 Jan 2009 19:29:04 +0000 (19:29 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 28 Jan 2009 19:29:04 +0000 (19:29 +0000)
includes/specials/SpecialUpload.php

index 7529d47..6d98d95 100644 (file)
@@ -566,8 +566,10 @@ class UploadForm {
                 * Try actually saving the thing...
                 * It will show an error form on failure.
                 */
-               $pageText = self::getInitialPageText( $this->mComment, $this->mLicense,
-                       $this->mCopyrightStatus, $this->mCopyrightSource );
+               if( !$this->mReUpload ) {
+                       $pageText = self::getInitialPageText( $this->mComment, $this->mLicense,
+                               $this->mCopyrightStatus, $this->mCopyrightSource );
+               }       
 
                $status = $this->mLocalFile->upload( $this->mTempPath, $this->mComment, $pageText,
                        File::DELETE_SOURCE, $this->mFileProps );