From 93319562612d6aa034aad63c4c61e13e4194056a Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sun, 2 Apr 2006 15:42:27 +0000 Subject: [PATCH] (bug 2871) Links to talk pages in watchlist editing view --- RELEASE-NOTES | 1 + includes/SpecialWatchlist.php | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5c342939fd..9d0cd341f3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -392,6 +392,7 @@ Special Pages: * Show links to user page, talk page and contributions page on Special:Newpages * Special:Export can now export a list of all contributors to an article (off by default) * (bug 5372) Add number of files to Special:Statistics +* (bug 2871) Links to talk pages in watchlist editing view Misc.: * PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect diff --git a/includes/SpecialWatchlist.php b/includes/SpecialWatchlist.php index 7f6653156f..ce1b09a4b1 100644 --- a/includes/SpecialWatchlist.php +++ b/includes/SpecialWatchlist.php @@ -155,6 +155,15 @@ function wfSpecialWatchlist( $par ) { $sql = "SELECT wl_namespace,wl_title FROM $watchlist WHERE wl_user=$uid"; $res = $dbr->query( $sql, $fname ); + + # Batch existence check + $linkBatch = new LinkBatch(); + while( $row = $dbr->fetchObject( $res ) ) + $linkBatch->addObj( Title::makeTitleSafe( $row->wl_namespace, $row->wl_title ) ); + $linkBatch->execute(); + if( $dbr->numRows( $res ) > 0 ) + $dbr->dataSeek( $res, 0 ); # Let's do the time warp again! + $sk = $wgUser->getSkin(); $list = array(); @@ -170,19 +179,19 @@ function wfSpecialWatchlist( $par ) { $wgOut->addHTML( '

' . $wgContLang->getFormattedNsText( $ns ) . '

' ); $wgOut->addHTML( '