Index: trunk/phase3/includes/filerepo/LocalFile.php |
— | — | @@ -863,6 +863,25 @@ |
864 | 864 | /** |
865 | 865 | * Record a file upload in the upload log and the image table |
866 | 866 | */ |
| 867 | + function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '', |
| 868 | + $watch = false, $timestamp = false ) |
| 869 | + { |
| 870 | + $pageText = SpecialUpload::getInitialPageText( $desc, $license, $copyStatus, $source ); |
| 871 | + |
| 872 | + if ( !$this->recordUpload2( $oldver, $desc, $pageText ) ) { |
| 873 | + return false; |
| 874 | + } |
| 875 | + |
| 876 | + if ( $watch ) { |
| 877 | + global $wgUser; |
| 878 | + $wgUser->addWatch( $this->getTitle() ); |
| 879 | + } |
| 880 | + return true; |
| 881 | + } |
| 882 | + |
| 883 | + /** |
| 884 | + * Record a file upload in the upload log and the image table |
| 885 | + */ |
867 | 886 | function recordUpload2( |
868 | 887 | $oldver, $comment, $pageText, $props = false, $timestamp = false, $user = null |
869 | 888 | ) { |