From 8588e3e15ebe40cc7c176f7d8b9ed04d64fbc0ba Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 15 Aug 2011 18:35:19 +0000 Subject: [PATCH] Partial revert to r87584 To fix bug bug 30355 importImages.php Internal Error --- includes/filerepo/LocalFile.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index d879f07b78..03a951af2c 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -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 */ -- 2.20.1