* New hook SpecialRandomGetRandomTitle allows extensions to modify the selection
criteria used by Special:Random and subclasses, or substitute a custom result,
deprecating the $wgExtraRandompageSQL config variable
+* (bug 20318) Distinct CSS classes for ISBN/RFC/PMID special links added
=== Bug fixes in 1.16 ===
return $this->makeFreeExternalLink( $m[0] );
} elseif ( isset( $m[4] ) && $m[4] !== '' ) {
# RFC or PMID
+ $CssClass = '';
if ( substr( $m[0], 0, 3 ) === 'RFC' ) {
$keyword = 'RFC';
$urlmsg = 'rfcurl';
+ $CssClass = 'mw-magiclink-rfc';
$id = $m[4];
} elseif ( substr( $m[0], 0, 4 ) === 'PMID' ) {
$keyword = 'PMID';
$urlmsg = 'pubmedurl';
+ $CssClass = 'mw-magiclink-pmid';
$id = $m[4];
} else {
throw new MWException( __METHOD__.': unrecognised match type "' .
}
$url = wfMsg( $urlmsg, $id);
$sk = $this->mOptions->getSkin();
- $la = $sk->getExternalLinkAttributes();
+ $la = $sk->getExternalLinkAttributes( "external $CssClass" );
return "<a href=\"{$url}\"{$la}>{$keyword} {$id}</a>";
} elseif ( isset( $m[5] ) && $m[5] !== '' ) {
# ISBN
$titleObj = SpecialPage::getTitleFor( 'Booksources', $num );
return'<a href="' .
$titleObj->escapeLocalUrl() .
- "\" class=\"internal\">ISBN $isbn</a>";
+ "\" class=\"internal mw-magiclink-isbn\">ISBN $isbn</a>";
} else {
return $m[0];
}