#
# Patch for Bugzilla to enable the magic identifiers in bug comments.
#

--- bugzilla-3.0.2-orig/Bugzilla/Template.pm
+++ bugzilla-3.0.2/Bugzilla/Template.pm
@@ -311,6 +311,18 @@ sub quoteUrls {
     $text =~ s~^(&gt;.+)$~<span class="quote">$1</span >~mg;
     $text =~ s~</span >\n<span class="quote">~\n~g;
 
+    # BugID:
+    $text =~ s~\b(BugID:)\s?(\d+)\b
+              ~$1 . " " . get_bug_link($2,$2)~egox;
+
+    # VCS:
+    $text =~ s~\b(VCS:)\s?([0-9A-Za-z_/\-.]*)\b
+              ~$1 <a href=\"/cgi-bin/viewvc.cgi/$2\">$2</a>~igx;
+
+    # Wiki:
+    $text =~ s~\b(Wiki:)\s?([A-Za-z_\-:]*)\b
+              ~$1 <a href=\"/wiki/index.php/$2\">$2</a>~igx;
+
     # mailto:
     # Use |<nothing> so that $1 is defined regardless
     $text =~ s~\b(mailto:|)?([\w\.\-\+\=]+\@[\w\-]+(?:\.[\w\-]+)+)\b


