X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FExport.php;h=98de4c001b6f5536de3ee4c7cd01db3259890054;hb=876bddf6376fe75952735ee3f231f557c2da48d0;hp=e533dbc7323dd69b50399ae2751f3454e246dd95;hpb=2525ceb3cdc1b1c50526ea128af3677fed2049b4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Export.php b/includes/Export.php index e533dbc732..98de4c001b 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -689,7 +689,7 @@ class XmlDumpWriter { $content_model = strval( $row->rev_content_model ); } else { // probably using $wgContentHandlerUseDB = false; - // @todo: test! + // @todo test! $title = Title::makeTitle( $row->page_namespace, $row->page_title ); $content_model = ContentHandler::getDefaultModelFor( $title ); } @@ -700,7 +700,7 @@ class XmlDumpWriter { $content_format = strval( $row->rev_content_format ); } else { // probably using $wgContentHandlerUseDB = false; - // @todo: test! + // @todo test! $content_handler = ContentHandler::getForModelID( $content_model ); $content_format = $content_handler->getDefaultFormat(); } @@ -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 = '';