* Clean up Special:Listusers; add an "(all)" label to the group selection box
* (bug 5812) Use appropriate link colour in Special:Mostlinked
* (bug 5802) {{CURRENTMONTHNAME}} variable broken in Vietnamese locale
+* (bug 5817) Appropriate handling for Special:Recentchangeslinked where the target
+ page doesn't exist
== Compatibility ==
$wgOut->setPagetitle( wfMsg( 'recentchangeslinked' ) );
$sk = $wgUser->getSkin();
- if (is_null($target)) {
- $wgOut->errorpage( 'notargettitle', 'notargettext' );
+ # Validate the title
+ $nt = Title::newFromURL( $target );
+ if( !is_object( $nt ) ) {
+ $wgOut->errorPage( 'notargettitle', 'notargettext' );
return;
}
- $nt = Title::newFromURL( $target );
- if( !$nt ) {
- $wgOut->errorpage( 'notargettitle', 'notargettext' );
+
+ # Check for existence
+ # Do a quiet redirect back to the page itself if it doesn't
+ if( !$nt->exists() ) {
+ $wgOut->redirect( $nt->getLocalUrl() );
return;
}
+
$id = $nt->getArticleId();
$wgOut->setSubtitle( htmlspecialchars( wfMsg( 'rclsub', $nt->getPrefixedText() ) ) );