From 6d9aaa95ccb681b3e4a518141aabae1dc4e44bc3 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Thu, 22 Jun 2006 22:45:25 +0000 Subject: [PATCH] the mad's touch: make bug reports linked from the changelog :D git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@335 839d8a87-29fc-0310-9880-83ba4fa771e5 --- ChangeLog | 1 + htdocs/changeLog.php | 28 ++++++++++++++++++++++------ templates/changeLog.tpl | 4 ++-- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7e2c4d6..7e23025 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ New : * Documentation : - Display ChangeLog in site. -Car + - Bounty: link bug reports from Changelog. -MC * Geoloc : - Dynamic maps using geodesix plugin. -Car diff --git a/htdocs/changeLog.php b/htdocs/changeLog.php index dbc6f83..87f35ff 100644 --- a/htdocs/changeLog.php +++ b/htdocs/changeLog.php @@ -19,9 +19,25 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ - require_once 'xorg.inc.php'; - - new_skinned_page('changeLog.tpl', AUTH_PUBLIC); - $page->assign('ChangeLog', file_get_contents($globals->spoolroot.'/ChangeLog')); - $page->run(); - ?> \ No newline at end of file +require_once 'xorg.inc.php'; + +new_skinned_page('changeLog.tpl', AUTH_PUBLIC); + +function bugize($list) +{ + $list = split(',', $list); + $ans = array(); + + foreach ($list as $bug) { + $clean = str_replace('#', '', $bug); + $ans[] = "$bug"; + } + + return join(',', $ans); +} + +$clog = htmlentities(file_get_contents($globals->spoolroot.'/ChangeLog')); +$clog = preg_replace('!(#[0-9]+(,[0-9]+)*)!e', 'bugize("\1")', $clog); +$page->assign('ChangeLog', $clog); +$page->run(); +?> diff --git a/templates/changeLog.tpl b/templates/changeLog.tpl index cf83a42..21b777d 100644 --- a/templates/changeLog.tpl +++ b/templates/changeLog.tpl @@ -22,5 +22,5 @@

ChangeLog

Voici la liste des modifications faites sur plat/al, le support libre de ce site.

-{$ChangeLog}
-
\ No newline at end of file +{$ChangeLog|smarty:nodefaults} + -- 2.1.4