diff options
author | Sebastian Mendel <cybot_tm@users.sourceforge.net> | 2006-04-12 17:15:43 +0400 |
---|---|---|
committer | Sebastian Mendel <cybot_tm@users.sourceforge.net> | 2006-04-12 17:15:43 +0400 |
commit | 5aa016d32c4d80c2520a609204865837b310f42b (patch) | |
tree | 3514d9665820fccf41e67e96bb8732e049cb35f4 /changelog.php | |
parent | a5c26c15df5681071508be3d5527ab4d544719b1 (diff) |
link users, files, bugs, rfes and patches
Diffstat (limited to 'changelog.php')
-rw-r--r-- | changelog.php | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/changelog.php b/changelog.php index 5033c41957..e55c02d93d 100644 --- a/changelog.php +++ b/changelog.php @@ -1,8 +1,42 @@ <?php -// Simple script to set correct charset for changelog -/* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +/** + * Simple script to set correct charset for changelog + * + * @id $Id$ + * @todo link release tags + */ -header('Content-type: text/plain; charset=utf-8'); -readfile('ChangeLog'); +$changelog = htmlspecialchars(file_get_contents('ChangeLog')); + +$replaces = array( + // sourceforge addresses + '/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+) <(.*)@users.sourceforge.net>/i' + => '\\1 <a href="https://sourceforge.net/users/\\3/">\\2</a>', + + // mail adresse + '/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+) <(.*@.*)>/i' + => '\\1 <a href="mailto:\\3/">\\2</a>', + + // linking bugs + '/bug\s+#([0-9]*)/i' + => '<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=\\1&group_id=23067&atid=377408">bug \\1</a>', + + // linking pacthes + '/patch\s+#([0-9]*)/i' + => '<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=\\1&group_id=23067&atid=377410">patch \\1</a>', + + // linking RFE + '/rfe\s+#([0-9]*)/i' + => '<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=\\1&group_id=23067&atid=377411">RFE \\1</a>', + + // linking files + '/(\s+)([\\/a-z_0-9\.]+\.php)/i' + => '\\1<a href="https://cvs.sourceforge.net/viewcvs.py/phpmyadmin/phpMyAdmin/\\2?annotate=HEAD">\\2</a>', +); + +header('Content-type: text/html; charset=utf-8'); +echo '<pre>'; +echo preg_replace(array_keys($replaces), $replaces, $changelog); +echo '</pre>'; ?> |