Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -945,13 +945,16 @@ |
946 | 946 | return $this->makeFreeExternalLink( $m[0] ); |
947 | 947 | } elseif ( isset( $m[4] ) && $m[4] !== '' ) { |
948 | 948 | # RFC or PMID |
| 949 | + $CssClass = ''; |
949 | 950 | if ( substr( $m[0], 0, 3 ) === 'RFC' ) { |
950 | 951 | $keyword = 'RFC'; |
951 | 952 | $urlmsg = 'rfcurl'; |
| 953 | + $CssClass = 'mw-magiclink-rfc'; |
952 | 954 | $id = $m[4]; |
953 | 955 | } elseif ( substr( $m[0], 0, 4 ) === 'PMID' ) { |
954 | 956 | $keyword = 'PMID'; |
955 | 957 | $urlmsg = 'pubmedurl'; |
| 958 | + $CssClass = 'mw-magiclink-pmid'; |
956 | 959 | $id = $m[4]; |
957 | 960 | } else { |
958 | 961 | throw new MWException( __METHOD__.': unrecognised match type "' . |
— | — | @@ -959,7 +962,7 @@ |
960 | 963 | } |
961 | 964 | $url = wfMsg( $urlmsg, $id); |
962 | 965 | $sk = $this->mOptions->getSkin(); |
963 | | - $la = $sk->getExternalLinkAttributes(); |
| 966 | + $la = $sk->getExternalLinkAttributes( "external $CssClass" ); |
964 | 967 | return "<a href=\"{$url}\"{$la}>{$keyword} {$id}</a>"; |
965 | 968 | } elseif ( isset( $m[5] ) && $m[5] !== '' ) { |
966 | 969 | # ISBN |
— | — | @@ -972,7 +975,7 @@ |
973 | 976 | $titleObj = SpecialPage::getTitleFor( 'Booksources', $num ); |
974 | 977 | return'<a href="' . |
975 | 978 | $titleObj->escapeLocalUrl() . |
976 | | - "\" class=\"internal\">ISBN $isbn</a>"; |
| 979 | + "\" class=\"internal mw-magiclink-isbn\">ISBN $isbn</a>"; |
977 | 980 | } else { |
978 | 981 | return $m[0]; |
979 | 982 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -199,6 +199,7 @@ |
200 | 200 | * New hook SpecialRandomGetRandomTitle allows extensions to modify the selection |
201 | 201 | criteria used by Special:Random and subclasses, or substitute a custom result, |
202 | 202 | deprecating the $wgExtraRandompageSQL config variable |
| 203 | +* (bug 20318) Distinct CSS classes for ISBN/RFC/PMID special links added |
203 | 204 | |
204 | 205 | === Bug fixes in 1.16 === |
205 | 206 | |