Provide changelog links to transitioned SF.net trackers for bugs, rfe, patches

This commit is contained in:
J.M 2013-01-22 21:23:01 +01:00
parent 7490d1e77e
commit 35d76ecd66

View File

@ -44,6 +44,9 @@ if (is_readable($filename)) {
$changelog = htmlspecialchars($changelog);
$tracker_url = 'https://sourceforge.net/support/tracker.php?aid=\\1';
$tracker_url_bug = 'https://sourceforge.net/p/phpmyadmin/bugs/\\1/';
$tracker_url_rfe = 'https://sourceforge.net/p/phpmyadmin/feature-requests/\\1/';
$tracker_url_patch = 'https://sourceforge.net/p/phpmyadmin/patches/\\1/';
$github_url = 'https://github.com/phpmyadmin/phpmyadmin/';
$replaces = array(
@ -58,7 +61,7 @@ $replaces = array(
'/thanks to ([^\(\r\n]+) -\s+([-\w]+)/i'
=> 'thanks to <a href="https://sourceforge.net/users/\\2/">\\1</a>',
// mail adresse
// mail address
'/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +&lt;(.*@.*)&gt;/i'
=> '\\1 <a href="mailto:\\3">\\2</a>',
@ -86,6 +89,17 @@ $replaces = array(
'/(?<!bug|RFE|patch) #?([0-9]{6,})/i'
=> '<a href="' . $tracker_url . '">bug #\\1</a>',
// transitioned SF.net project bug/rfe/patch links
// by the time we reach 6-digit numbers, we can probably retire the above links
'/patch\s*#?([0-9]{4,5}) /i'
=> '<a href="' . $tracker_url_patch . '">patch #\\1</a> ',
'/(?:rfe|feature)\s*#?([0-9]{4,5}) /i'
=> '<a href="' . $tracker_url_rfe . '">RFE #\\1</a> ',
'/bug\s*#?([0-9]{4,5}) /i'
=> '<a href="' . $tracker_url_bug . '">bug #\\1</a> ',
'/(?<!bug|RFE|patch) #?([0-9]{4,5}) /i'
=> '<a href="' . $tracker_url_bug . '">bug #\\1</a> ',
// CVE/CAN entries
'/((CAN|CVE)-[0-9]+-[0-9]+)/'
=> '<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=\\1">\\1</a>',