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
Merge "Set visibility on class properties of Job"
[lhc/web/wiklou.git]
/
includes
/
Export.php
diff --git
a/includes/Export.php
b/includes/Export.php
index
e533dbc
..
3d34763
100644
(file)
--- a/
includes/Export.php
+++ b/
includes/Export.php
@@
-604,7
+604,7
@@
class XmlDumpWriter {
if ( $row->page_is_redirect ) {
$page = WikiPage::factory( $title );
$redirect = $page->getRedirectTarget();
if ( $row->page_is_redirect ) {
$page = WikiPage::factory( $title );
$redirect = $page->getRedirectTarget();
- if ( $redirect instance
O
f Title && $redirect->isValidRedirectTarget() ) {
+ if ( $redirect instance
o
f Title && $redirect->isValidRedirectTarget() ) {
$out .= ' ' . Xml::element( 'redirect', array( 'title' => self::canonicalTitle( $redirect ) ) ) . "\n";
}
}
$out .= ' ' . Xml::element( 'redirect', array( 'title' => self::canonicalTitle( $redirect ) ) ) . "\n";
}
}
@@
-689,7
+689,7
@@
class XmlDumpWriter {
$content_model = strval( $row->rev_content_model );
} else {
// probably using $wgContentHandlerUseDB = false;
$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 );
}
$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;
$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();
}
$content_handler = ContentHandler::getForModelID( $content_model );
$content_format = $content_handler->getDefaultFormat();
}
@@
-824,10
+824,13
@@
class XmlDumpWriter {
$archiveName = '';
}
if ( $dumpContents ) {
$archiveName = '';
}
if ( $dumpContents ) {
+ $be = $file->getRepo()->getBackend();
# Dump file as base64
# Uses only XML-safe characters, so does not need escaping
# 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 = ' <contents encoding="base64">' .
$contents = ' <contents encoding="base64">' .
- chunk_split( base64_encode( file_get_contents( $file->getPath() ) ) ) .
+ chunk_split( base64_encode(
+ $be->getFileContents( array( 'src' => $file->getPath() ) ) ) ) .
" </contents>\n";
} else {
$contents = '';
" </contents>\n";
} else {
$contents = '';