|
From: Ulf E. <ulf...@us...> - 2005-10-10 19:32:29
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26827 Modified Files: bug.php Log Message: Fix for bug #1322917 - auto add of html link to "bug ..." don't work Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.155 retrieving revision 1.156 diff -u -r1.155 -r1.156 --- bug.php 5 Oct 2005 20:36:02 -0000 1.155 +++ bug.php 10 Oct 2005 19:31:53 -0000 1.156 @@ -115,16 +115,16 @@ // Set up the regex replacements $patterns = array( - '/(bug)[[:space:]]*(#?)([0-9]+)/i', // matches bug #nn - '/cvs:([^\.\s:,\?!]+(\.[^\.\s:,\?!]+)*)(:)?(\d\.[\d\.]+)?([\W\s])?/i', // matches cvs:filename.php or cvs:filename.php:n.nn '/</', '/>/', + '/(bug)[[:space:]]*(#?)([0-9]+)/i', // matches bug #nn + '/cvs:([^\.\s:,\?!]+(\.[^\.\s:#,\?!]+)*)([:#](rev|r)?)?(\d\.[\d\.]+)?([\W\s])?/i', // matches cvs:filename.php, cvs:filename.php:n.nn or cvs:filename.php#revn.nn ); $replacements = array( - "\\1 <a href='$me?op=show&bugid=\\3'>\\2\\3</a>", // internal link to bug - '<a href="'.CVS_WEB.'\\1#rev\\4" target="_new">\\1</a>\\5', // external link to cvs web interface '<', '>', + "<a href='$me?op=show&bugid=\\3'>\\1 \\2\\3</a>", // internal link to bug + '<a href="'.CVS_WEB.'\\1#rev\\5" target="_new">\\1</a>\\6', // external link to cvs web interface ); return nl2br(preg_replace($patterns, $replacements, stripslashes($comments))); |