global $wgCheckFileExtensions, $wgStrictFileExtensions;
global $wgFileExtensions, $wgFileBlacklist, $wgUploadSizeWarning;
+ /** When using detailed copyright, if user filled field, assume he
+ * confirmed the upload */
if ( $wgUseCopyrightUpload ) {
$this->mUploadAffirm = 1;
if ($wgCheckCopyrightUpload &&
}
}
+ /** User need to confirm his upload */
if ( $this->mUploadAffirm != 1) {
$this->mainUploadForm( WfMsg( 'noaffirmation' ) );
return;
}
- if ( '' != $this->mOname ) {
+ if ( $this->mOname != '' ) {
$basename = strrchr( $this->mOname, '/' );
if ( false === $basename ) { $basename = $this->mOname; }
$basename = $bn;
}
-
$nt = Title::newFromText( $basename );
if( !$nt ) {
return $this->uploadError( wfMsg( 'illegalfilename', htmlspecialchars( $basename ) ) );
}
if($warning != '') return $this->uploadWarning($warning);
}
+ } else {
+ return $this->uploadError('<li>'.wfMsg( 'emptyfile' ).'</li>');
+
}
if ( !is_null( $this->mUploadOldVersion ) ) {
$wgUploadOldVersion = $this->mUploadOldVersion;