dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UploadBase: Replace 'emptyfile' warning code by 'empty-file'
[lhc/web/wiklou.git]
/
includes
/
upload
/
UploadBase.php
diff --git
a/includes/upload/UploadBase.php
b/includes/upload/UploadBase.php
index
fb25249
..
9837a95
100644
(file)
--- a/
includes/upload/UploadBase.php
+++ b/
includes/upload/UploadBase.php
@@
-241,12
+241,14
@@
abstract class UploadBase {
*/
protected function setTempFile( $tempPath, $fileSize = null ) {
$this->mTempPath = $tempPath;
*/
protected function setTempFile( $tempPath, $fileSize = null ) {
$this->mTempPath = $tempPath;
+ $this->mFileSize = $fileSize ?: null;
if ( strlen( $this->mTempPath ) && file_exists( $this->mTempPath ) ) {
$this->tempFileObj = new TempFSFile( $this->mTempPath );
if ( strlen( $this->mTempPath ) && file_exists( $this->mTempPath ) ) {
$this->tempFileObj = new TempFSFile( $this->mTempPath );
- $this->mFileSize = $fileSize ?: filesize( $this->mTempPath );
+ if ( !$fileSize ) {
+ $this->mFileSize = filesize( $this->mTempPath );
+ }
} else {
$this->tempFileObj = null;
} else {
$this->tempFileObj = null;
- $this->mFileSize = null;
}
}
}
}
@@
-664,7
+666,7
@@
abstract class UploadBase {
}
if ( $this->mFileSize == 0 ) {
}
if ( $this->mFileSize == 0 ) {
- $warnings['emptyfile'] = true;
+ $warnings['empty
-
file'] = true;
}
$exists = self::getExistsWarning( $localFile );
}
$exists = self::getExistsWarning( $localFile );