Index: trunk/tools/bugzilla/bugzilla-4.0/extensions/Wikimedia/Extension.pm |
— | — | @@ -45,6 +45,10 @@ |
46 | 46 | match => qr{r(\d+)}, |
47 | 47 | replace => \&_createCodeReviewLink |
48 | 48 | }; |
| 49 | + my $replacerRT = { |
| 50 | + match => qr{rt\ ?\#?(\d+)}, |
| 51 | + replace => \&_createRTLink |
| 52 | + }; |
49 | 53 | #~\br(\d+)\b |
50 | 54 | # "<a href=\"https://www.mediawiki.org" . |
51 | 55 | # "/wiki/Special:Code/MediaWiki/$1\" " . |
— | — | @@ -52,6 +56,7 @@ |
53 | 57 | |
54 | 58 | push( @$regexes, $replacerWP ); |
55 | 59 | push( @$regexes, $replacerCR ); |
| 60 | + push( @$regexes, $replacerRT ); |
56 | 61 | } |
57 | 62 | |
58 | 63 | sub _createWikipediaLink { |
— | — | @@ -65,5 +70,10 @@ |
66 | 71 | my $rev_link = "<a href=\"https://www.mediawiki.org/wiki/Special:Code/MediaWiki/$1\" title=\"revision $1 in SVN\">r$1</a>"; |
67 | 72 | return $rev_link; |
68 | 73 | }; |
| 74 | + |
| 75 | +sub _createRTLink { |
| 76 | + my $rev_link = "<a href=\"https://rt.wikimedia.org/Ticket/Display.html?id=$1\" title=\"RT #$1\">RT #$1</a>"; |
| 77 | + return $rev_link; |
| 78 | +}; |
69 | 79 | |
70 | 80 | __PACKAGE__->NAME; |