return $status;
}
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
$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'] );
} 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'] ) ) {