r102875 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102874‎ | r102875 | r102876 >
Date:01:50, 13 November 2011
Author:diederik
Status:ok (Comments)
Tags:
Comment:
This patch fixes rev. 102575.
Modified paths:
  • /trunk/phase3/includes/Export.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Export.php
@@ -476,14 +476,14 @@
477477 function openPage( $row ) {
478478 $out = " <page>\n";
479479 $title = Title::makeTitle( $row->page_namespace, $row->page_title );
480 - $out .= ' ' . Xml::elementClean( 'title', array(), strval( $title->getPrefixedText() ) ) . "\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 ) {
484484 $page = WikiPage::factory( $title );
485485 $redirect = $page->getRedirectTarget();
486 - if ( $redirect !== null ) {
487 - $out .= ' ' . Xml::element( 'redirect', array( 'title' => strval( $redirect ) ) ) . "\n";
 486+ $redirect instanceOf Title && $redirect->isValidRedirectTarget() {
 487+ $out .= ' ' . Xml::element( 'redirect', array( 'title' => $redirect->getPrefixedText() ) ) . "\n";
488488 }
489489 }
490490 if ( $row->page_restrictions != '' ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r102906Fixup for r102875 parse error....platonides19:58, 13 November 2011

Comments

#Comment by 😂 (talk | contribs)   01:52, 13 November 2011

r102575, for the link. Also:

PHP Parse error:  syntax error, unexpected '{' in Export.php on line 485

Status & tagging log