Partial revert to r87584
authorSam Reed <reedy@users.mediawiki.org>
Mon, 15 Aug 2011 18:35:19 +0000 (18:35 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 15 Aug 2011 18:35:19 +0000 (18:35 +0000)
To fix bug bug 30355 importImages.php Internal Error

includes/filerepo/LocalFile.php

index d879f07..03a951a 100644 (file)
@@ -860,6 +860,25 @@ class LocalFile extends File {
                return $status;
        }
 
+       /**
+        * Record a file upload in the upload log and the image table
+        */
+       function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '',
+               $watch = false, $timestamp = false )
+       {
+               $pageText = SpecialUpload::getInitialPageText( $desc, $license, $copyStatus, $source );
+
+               if ( !$this->recordUpload2( $oldver, $desc, $pageText ) ) {
+                       return false;
+               }
+
+               if ( $watch ) {
+                       global $wgUser;
+                       $wgUser->addWatch( $this->getTitle() );
+               }
+               return true;
+       }
+
        /**
         * Record a file upload in the upload log and the image table
         */