function openPage( $row ) {
$out = " <page>\n";
$title = Title::makeTitle( $row->page_namespace, $row->page_title );
- $out .= ' ' . Xml::elementClean( 'title', array(), $title->getPrefixedText() ) . "\n";
+ $out .= ' ' . Xml::elementClean( 'title', array(), self::canonicalTitle( $title ) ) . "\n";
$out .= ' ' . Xml::element( 'ns', array(), strval( $row->page_namespace) ) . "\n";
$out .= ' ' . Xml::element( 'id', array(), strval( $row->page_id ) ) . "\n";
if ( $row->page_is_redirect ) {
$out .= ' ' . Xml::element( 'redirect', array( 'title' => self::canonicalTitle( $redirect ) ) ) . "\n";
}
}
+
+ if ( $row->rev_sha1 ) {
+ $out .= " " . Xml::element('sha1', null, strval( $row->rev_sha1 ) ) . "\n";
+ } else {
+ $out .= " <sha1/>\n";
+ }
+
if ( $row->page_restrictions != '' ) {
$out .= ' ' . Xml::element( 'restrictions', array(),
strval( $row->page_restrictions ) ) . "\n";
* Closes a <page> section on the output stream.
*
* @access private
+ * @return string
*/
function closePage() {
return " </page>\n";
$out .= $this->writeTimestamp( $row->rev_timestamp );
- if ( $row->rev_sha1 ) {
- $out .= " " . Xml::element('sha1', null, strval($row->rev_sha1) ) . "\n";
- } else {
- $out .= " <sha1/>\n";
- }
-
if ( $row->rev_deleted & Revision::DELETED_USER ) {
$out .= " " . Xml::element( 'contributor', array( 'deleted' => 'deleted' ) ) . "\n";
} else {
/**
* Warning! This data is potentially inconsistent. :(
+ * @return string
*/
function writeUploads( $row, $dumpContents = false ) {
if ( $row->page_namespace == NS_IMAGE ) {
/**
* Returns the name of the file or files which are
* being written to, if there are any.
+ * @return null
*/
function getFilenames() {
return NULL;