link users, files, bugs, rfes and patches
This commit is contained in:
@@ -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>';
|
||||
?>
|
||||
|
Reference in New Issue
Block a user