From: Aaron Schulz Date: Thu, 6 Jun 2013 07:34:30 +0000 (-0700) Subject: Use getFileContents() instead of incorrect file system call to fetch file contents. X-Git-Tag: 1.31.0-rc.0~19391^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=3b5770835d91d01d2d906cd8c9e6a00058fc0001;p=lhc%2Fweb%2Fwiklou.git Use getFileContents() instead of incorrect file system call to fetch file contents. Change-Id: I2b9be4165ae85c52ff9a9b68b9d71ec011a6c5b4 --- 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 = '';