* Added token to watch links
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 12 Jul 2011 17:22:23 +0000 (17:22 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 12 Jul 2011 17:22:23 +0000 (17:22 +0000)
* Call Linker methods statically

includes/specials/SpecialUnwatchedpages.php

index 86aa2b2..0f11140 100644 (file)
@@ -71,15 +71,16 @@ class UnwatchedpagesPage extends QueryPage {
                $nt = Title::makeTitle( $result->namespace, $result->title );
                $text = $wgContLang->convert( $nt->getPrefixedText() );
 
-               $plink = $skin->linkKnown(
+               $plink = Linker::linkKnown(
                        $nt,
                        htmlspecialchars( $text )
                );
-               $wlink = $skin->linkKnown(
+               $token = WatchAction::getWatchToken( $nt, $this->getUser() );
+               $wlink = Linker::linkKnown(
                        $nt,
                        wfMsgHtml( 'watch' ),
                        array(),
-                       array( 'action' => 'watch' )
+                       array( 'action' => 'watch', 'token' => $token )
                );
 
                return wfSpecialList( $plink, $wlink );