Revert r28215: incorrectly moved files
[lhc/web/wiklou.git] / includes / SpecialRecentchangeslinked.php
index e116c40..2a8ac32 100644 (file)
@@ -24,22 +24,18 @@ function wfSpecialRecentchangeslinked( $par = NULL ) {
        $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->setPageTitle( wfMsg( 'recentchangeslinked-title', $nt->getPrefixedText() ) );
        $wgOut->setSubtitle( htmlspecialchars( wfMsg( 'rclsub', $nt->getPrefixedText() ) ) );
 
        if ( ! $days ) {
@@ -142,7 +138,7 @@ $GROUPBY
        }
        $res = $dbr->query( $sql, $fname );
 
-       $wgOut->addHTML("&lt; ".$sk->makeKnownLinkObj($nt, "", "redirect=no" )."<br />\n");
+       $wgOut->addHTML("&lt; ".$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 />" );
 
@@ -176,4 +172,4 @@ $GROUPBY
        $wgOut->addHTML( $s );
 }
 
-?>
+