Commit: ed88ef438e7462319f469a9de010b6dc1dc82518 Author: Hannes Magnusson <[email protected]> Tue, 31 Dec 2013 14:44:37 -0800 Parents: a864da2441be9edf779b360f67577ea3ae4a1cbe Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=ed88ef438e7462319f469a9de010b6dc1dc82518 Log: Link devs to people. Changed paths: M www/bug.php Diff: diff --git a/www/bug.php b/www/bug.php index 0e422d2..52f98c2 100644 --- a/www/bug.php +++ b/www/bug.php @@ -1183,6 +1183,16 @@ function mark_related_bugs($from, $comment_name, $ncomment) } } +function link_to_people($email, $text) +{ + $domain = strstr($email, "@"); + if ($domain == "@php.net") { + $username = strstr($email, "@", true); + return '<a href="//people.php.net/user.php?username=' . $username . '">' . $text . '</a>'; + } + return $text; +} + function output_note($com_id, $ts, $email, $comment, $comment_type, $comment_name, $is_hidden = false) { global $edit, $bug_id, $dbh, $is_trusted_developer, $logged_in; @@ -1192,7 +1202,7 @@ function output_note($com_id, $ts, $email, $comment, $comment_type, $comment_nam echo "<div class='comment type_{$comment_type}' {$display}>"; echo '<a name="' , urlencode($ts) , '"> </a>'; echo "<strong>[" , format_date($ts) , "] "; - echo spam_protect(htmlspecialchars($email)) , "</strong>\n"; + echo link_to_people($email, spam_protect(htmlspecialchars($email))) , "</strong>\n"; switch ($comment_type) { -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
