Index: trunk/phase3/includes/SpecialExport.php |
— | — | @@ -339,10 +339,10 @@ |
340 | 340 | print "<page>\n"; |
341 | 341 | $title = Title::makeTitle( $row->page_namespace, $row->page_title ); |
342 | 342 | print ' ' . wfElementClean( 'title', array(), $title->getPrefixedText() ) . "\n"; |
343 | | - print ' ' . wfElement( 'id', array(), $row->page_id ) . "\n"; |
| 343 | + print ' ' . wfElement( 'id', array(), strval( $row->page_id ) ) . "\n"; |
344 | 344 | if( '' != $row->page_restrictions ) { |
345 | 345 | print ' ' . wfElement( 'restrictions', array(), |
346 | | - $row->page_restrictions ) . "\n"; |
| 346 | + strval( $row->page_restrictions ) ) . "\n"; |
347 | 347 | } |
348 | 348 | } |
349 | 349 | |
— | — | @@ -373,17 +373,17 @@ |
374 | 374 | wfProfileIn( $fname ); |
375 | 375 | |
376 | 376 | print " <revision>\n"; |
377 | | - print " " . wfElement( 'id', null, $row->rev_id ) . "\n"; |
| 377 | + print " " . wfElement( 'id', null, strval( $row->rev_id ) ) . "\n"; |
378 | 378 | |
379 | | - $ts = wfTimestamp2ISO8601( $row->rev_timestamp ); |
| 379 | + $ts = wfTimestamp2ISO8601( strval( $row->rev_timestamp ) ); |
380 | 380 | print " " . wfElement( 'timestamp', null, $ts ) . "\n"; |
381 | 381 | |
382 | 382 | print " <contributor>\n"; |
383 | 383 | if( $row->rev_user ) { |
384 | | - print " " . wfElementClean( 'username', null, $row->rev_user_text ) . "\n"; |
385 | | - print " " . wfElement( 'id', null, $row->rev_user ) . "\n"; |
| 384 | + print " " . wfElementClean( 'username', null, strval( $row->rev_user_text ) ) . "\n"; |
| 385 | + print " " . wfElement( 'id', null, strval( $row->rev_user ) ) . "\n"; |
386 | 386 | } else { |
387 | | - print " " . wfElementClean( 'ip', null, $row->rev_user_text ) . "\n"; |
| 387 | + print " " . wfElementClean( 'ip', null, strval( $row->rev_user_text ) ) . "\n"; |
388 | 388 | } |
389 | 389 | print " </contributor>\n"; |
390 | 390 | |
— | — | @@ -391,10 +391,10 @@ |
392 | 392 | print " <minor/>\n"; |
393 | 393 | } |
394 | 394 | if( $row->rev_comment != '' ) { |
395 | | - print " " . wfElementClean( 'comment', null, $row->rev_comment ) . "\n"; |
| 395 | + print " " . wfElementClean( 'comment', null, strval( $row->rev_comment ) ) . "\n"; |
396 | 396 | } |
397 | 397 | |
398 | | - $text = Revision::getRevisionText( $row ); |
| 398 | + $text = strval( Revision::getRevisionText( $row ) ); |
399 | 399 | print " " . wfElementClean( 'text', array( 'xml:space' => 'preserve' ), $text ) . "\n"; |
400 | 400 | |
401 | 401 | print " </revision>\n"; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -84,6 +84,8 @@ |
85 | 85 | * (bug 2143) Update Vietnamese interface |
86 | 86 | * Add 'reupload' and 'reupload-shared' permission keys to restrict new uploads |
87 | 87 | overwriting existing files; default is the old behavior (allowed). |
| 88 | +* Use strval() to make sure we don't accidentally get null on bad revision |
| 89 | + text loads or other fields mucking up XML export output |
88 | 90 | |
89 | 91 | |
90 | 92 | === Caveats === |