$wgOut->setPagetitle( wfMsg( 'recentchangeslinked' ) );
$sk = $wgUser->getSkin();
- # Validate the title
- $nt = Title::newFromURL( $target );
- if( !is_object( $nt ) ) {
- $wgOut->errorPage( 'notargettitle', 'notargettext' );
+ if (is_null($target)) {
+ $wgOut->errorpage( 'notargettitle', 'notargettext' );
return;
}
-
- # Check for existence
- # Do a quiet redirect back to the page itself if it doesn't
- if( !$nt->exists() ) {
- $wgOut->redirect( $nt->getLocalUrl() );
+ $nt = Title::newFromURL( $target );
+ if( !$nt ) {
+ $wgOut->errorpage( 'notargettitle', 'notargettext' );
return;
}
-
$id = $nt->getArticleId();
$wgOut->setSubtitle( htmlspecialchars( wfMsg( 'rclsub', $nt->getPrefixedText() ) ) );