From 3b5770835d91d01d2d906cd8c9e6a00058fc0001 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 6 Jun 2013 00:34:30 -0700 Subject: [PATCH] Use getFileContents() instead of incorrect file system call to fetch file contents. Change-Id: I2b9be4165ae85c52ff9a9b68b9d71ec011a6c5b4 --- includes/Export.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/Export.php b/includes/Export.php index a26e853eff..98de4c001b 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -824,10 +824,13 @@ class XmlDumpWriter { $archiveName = ''; } if ( $dumpContents ) { + $be = $file->getRepo()->getBackend(); # Dump file as base64 # Uses only XML-safe characters, so does not need escaping + # @TODO: too bad this loads the contents into memory (script might swap) $contents = ' ' . - chunk_split( base64_encode( file_get_contents( $file->getPath() ) ) ) . + chunk_split( base64_encode( + $be->getFileContents( array( 'src' => $file->getPath() ) ) ) ) . " \n"; } else { $contents = ''; -- 2.20.1