Index: trunk/phase3/includes/SpecialListredirects.php |
— | — | @@ -37,15 +37,23 @@ |
38 | 38 | $rd_link = $skin->makeKnownLinkObj( $rd_title, '', 'redirect=no' ); |
39 | 39 | |
40 | 40 | # Find out where the redirect leads |
41 | | - $rd_page = new Article( &$rd_title, 0 ); |
42 | | - $rd_text = $rd_page->getContent( true ); # Don't follow the redirect |
| 41 | + $revision = Revision::newFromTitle( $rd_title ); |
| 42 | + if( $revision ) { |
| 43 | + # Make a link to the destination page |
| 44 | + $target = Title::newFromRedirect( $revision->getText() ); |
| 45 | + if( $target ) { |
| 46 | + $targetLink = $skin->makeKnownLinkObj( $target ); |
| 47 | + } else { |
| 48 | + /** @todo Put in some decent error display here */ |
| 49 | + $targetLink = '*'; |
| 50 | + } |
| 51 | + } else { |
| 52 | + /** @todo Put in some decent error display here */ |
| 53 | + $targetLink = '*'; |
| 54 | + } |
43 | 55 | |
44 | | - # Make a link to the destination page |
45 | | - $tp_title = Title::newFromRedirect( $rd_text ); |
46 | | - $tp_link = $skin->makeKnownLinkObj( $tp_title ); |
47 | | - |
48 | 56 | # Format the whole thing and return it |
49 | | - return( $rd_link . ' → ' . $tp_link ); |
| 57 | + return( $rd_link . ' → ' . $targetLink ); |
50 | 58 | |
51 | 59 | } |
52 | 60 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -455,6 +455,7 @@ |
456 | 456 | * Skip loading of RecentChange.php except where needed |
457 | 457 | * Enforce $wgSVGMaxSize when rendering, even for SVGs with a very large source |
458 | 458 | size. This is necessary to limit server memory usage. |
| 459 | +* Cleanup and error checking on Special:Listredirects |
459 | 460 | |
460 | 461 | |
461 | 462 | === Caveats === |