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
TempFSFileFactory service
[lhc/web/wiklou.git]
/
includes
/
libs
/
filebackend
/
MemoryFileBackend.php
diff --git
a/includes/libs/filebackend/MemoryFileBackend.php
b/includes/libs/filebackend/MemoryFileBackend.php
index
44fe2cb
..
3932f34
100644
(file)
--- a/
includes/libs/filebackend/MemoryFileBackend.php
+++ b/
includes/libs/filebackend/MemoryFileBackend.php
@@
-19,7
+19,6
@@
*
* @file
* @ingroup FileBackend
*
* @file
* @ingroup FileBackend
- * @author Aaron Schulz
*/
/**
*/
/**
@@
-71,9
+70,9
@@
class MemoryFileBackend extends FileBackendStore {
return $status;
}
return $status;
}
-
MediaWiki
\suppressWarnings();
+
Wikimedia
\suppressWarnings();
$data = file_get_contents( $params['src'] );
$data = file_get_contents( $params['src'] );
-
MediaWiki
\restoreWarnings();
+
Wikimedia
\restoreWarnings();
if ( $data === false ) { // source doesn't exist?
$status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
if ( $data === false ) { // source doesn't exist?
$status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
@@
-169,7
+168,7
@@
class MemoryFileBackend extends FileBackendStore {
} else {
// Create a new temporary file with the same extension...
$ext = FileBackend::extensionFromPath( $src );
} else {
// Create a new temporary file with the same extension...
$ext = FileBackend::extensionFromPath( $src );
- $fsFile =
TempFSFile::factory( 'localcopy_', $ext, $this->tmpDirectory
);
+ $fsFile =
$this->tmpFileFactory->newTempFSFile( 'localcopy_', $ext
);
if ( $fsFile ) {
$bytes = file_put_contents( $fsFile->getPath(), $this->files[$src]['data'] );
if ( $bytes !== strlen( $this->files[$src]['data'] ) ) {
if ( $fsFile ) {
$bytes = file_put_contents( $fsFile->getPath(), $this->files[$src]['data'] );
if ( $bytes !== strlen( $this->files[$src]['data'] ) ) {