From: Sam Reed Date: Mon, 15 Aug 2011 18:35:19 +0000 (+0000) Subject: Partial revert to r87584 X-Git-Tag: 1.31.0-rc.0~28253 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=8588e3e15ebe40cc7c176f7d8b9ed04d64fbc0ba;p=lhc%2Fweb%2Fwiklou.git Partial revert to r87584 To fix bug bug 30355 importImages.php Internal Error --- 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 */