r40871 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40870‎ | r40871 | r40872 >
Date:19:20, 15 September 2008
Author:brion
Status:old
Tags:
Comment:
fix for 'Bug 1234' as well as 'bug 1234'
Modified paths:
  • /trunk/extensions/CodeReview/SpecialCode.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/SpecialCode.php
@@ -73,14 +73,15 @@
7474 function formatMessage( $value ){
7575 $value = nl2br( htmlspecialchars( $value ) );
7676 $value = preg_replace_callback( '/\br(\d+)\b/', array( $this, 'messageRevLink' ), $value );
77 - $value = preg_replace_callback( '/\bbug (\d+)\b/', array( $this, 'messageBugLink' ), $value );
 77+ $value = preg_replace_callback( '/\bbug (\d+)\b/i', array( $this, 'messageBugLink' ), $value );
7878 return "<code>$value</code>";
7979 }
8080
8181 function messageBugLink( $arr ){
 82+ $text = $arr[0];
8283 $bugNo = intval( $arr[1] );
8384 $url = $this->mRepo->getBugPath( $bugNo );
84 - return $this->mSkin->makeExternalLink( $url, "bug $bugNo" );
 85+ return $this->mSkin->makeExternalLink( $url, $text );
8586 }
8687
8788 function messageRevLink( $matches ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r40884quick hack to apply 'bug 1234' and 'r1234' link transformations to wikitext c...brion21:54, 15 September 2008

Status & tagging log