$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() ) ) );
}
$res = $dbr->query( $sql, $fname );
- $wgOut->addHTML("< ".$sk->makeKnownLinkObj($nt, "", "redirect=no" )."<br />\n");
+ $wgOut->addHTML("< ".$sk->makeLinkObj($nt, "", "redirect=no" )."<br />\n");
$note = wfMsgExt( "rcnote", array ( 'parseinline' ), $limit, $days, $wgLang->timeAndDate( wfTimestampNow(), true ) );
$wgOut->addHTML( "<hr />\n{$note}\n<br />" );