r108764 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108763‎ | r108764 | r108765 >
Date:21:34, 12 January 2012
Author:diederik
Status:reverted (Comments)
Tags:
Comment:
This commit restores getPrefixedText() to the Title in the XML. This means it does not break anything, the only change is that there is a new separate element that contains the namespace.

This commit is a follow up to:
r102575: Commit to fix bug 30513.
Modified paths:
  • /trunk/phase3/includes/Export.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Export.php
@@ -476,7 +476,7 @@
477477 function openPage( $row ) {
478478 $out = " <page>\n";
479479 $title = Title::makeTitle( $row->page_namespace, $row->page_title );
480 - $out .= ' ' . Xml::elementClean( 'title', array(), self::canonicalTitle( $title ) ) . "\n";
 480+ $out .= ' ' . Xml::elementClean( 'title', array(), $title->getPrefixedText() ) . "\n";
481481 $out .= ' ' . Xml::element( 'ns', array(), strval( $row->page_namespace) ) . "\n";
482482 $out .= ' ' . Xml::element( 'id', array(), strval( $row->page_id ) ) . "\n";
483483 if ( $row->page_is_redirect ) {
@@ -521,6 +521,12 @@
522522
523523 $out .= $this->writeTimestamp( $row->rev_timestamp );
524524
 525+ if ( $row->rev_sha1 ) {
 526+ $out .= " " . Xml::element('sha1', null, strval($row->rev_sha1) ) . "\n";
 527+ } else {
 528+ $out .= " <sha1/>\n";
 529+ }
 530+
525531 if ( $row->rev_deleted & Revision::DELETED_USER ) {
526532 $out .= " " . Xml::element( 'contributor', array( 'deleted' => 'deleted' ) ) . "\n";
527533 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r108771Revert r108764: doesn't appear to do what it says in the description, and no ...brion22:17, 12 January 2012
r109889Added the following three items:...diederik01:14, 24 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102575Commit to fix bug 30513.diederik21:15, 9 November 2011
r103945* (bug 32376) XML export tweak to use canonical user namespaces instead of ge...brion19:33, 22 November 2011

Comments

#Comment by Reedy (talk | contribs)   21:36, 12 January 2012

Doesn't this also require a new export.xsd file?

#Comment by Brion VIBBER (talk | contribs)   22:19, 12 January 2012

Reverted in r108771.

  • this adds a 'sha1' element that's not even described in the comment
  • this undoes part of a back-compatibility fix for the search indexers and other clients without any indication that the issue has been fixed in the search indexers etc

Status & tagging log