* 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
$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();
$wgOut->addHTML( '<h2>' . $wgContLang->getFormattedNsText( $ns ) . '</h2>' );
$wgOut->addHTML( '<ul>' );
foreach($titles as $title) {
- $t = Title::makeTitle( $ns, $title );
- if( is_null( $t ) ) {
+ $titleObj = Title::makeTitle( $ns, $title );
+ if( is_null( $titleObj ) ) {
$wgOut->addHTML(
'<!-- bad title "' .
htmlspecialchars( $s->wl_title ) . '" in namespace ' . $s->wl_namespace . " -->\n"
);
} else {
global $wgContLang;
- $t = $t->getPrefixedText();
+ $titleText = $titleObj->getPrefixedText();
+ $talkLink = $sk->makeLinkObj( $titleObj->getTalkPage(), $wgLang->getNsText( NS_TALK ) );
$wgOut->addHTML(
- '<li><input type="checkbox" name="id[]" value="' . htmlspecialchars($t) . '" />' . ' ' . ($wgContLang->isRTL() ? '‏' : '‎') .
- $sk->makeLink( $t, $t ) .
- "</li>\n"
+ '<li><input type="checkbox" name="id[]" value="' . htmlspecialchars( $titleObj->getPrefixedText() ) . '" />' . ' ' . ( $wgContLang->isRTL() ? '‏' : '‎' ) .
+ $sk->makeLinkObj( $titleObj ) . " ({$talkLink}) </li>\n"
);
}
}