Index: trunk/phase3/includes/Export.php |
— | — | @@ -476,14 +476,14 @@ |
477 | 477 | function openPage( $row ) { |
478 | 478 | $out = " <page>\n"; |
479 | 479 | $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"; |
481 | 481 | $out .= ' ' . Xml::element( 'ns', array(), strval( $row->page_namespace) ) . "\n"; |
482 | 482 | $out .= ' ' . Xml::element( 'id', array(), strval( $row->page_id ) ) . "\n"; |
483 | 483 | if ( $row->page_is_redirect ) { |
484 | 484 | $page = WikiPage::factory( $title ); |
485 | 485 | $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"; |
488 | 488 | } |
489 | 489 | } |
490 | 490 | if ( $row->page_restrictions != '' ) { |