diff options
author | swiergot <swiergot> | 2005-08-14 14:21:59 +0200 |
---|---|---|
committer | swiergot <swiergot> | 2005-08-14 14:21:59 +0200 |
commit | 549bae520ab634ee0f675199602d7572bd631b4b (patch) | |
tree | c272c0fd364e2358b0f2ec471ec6b1e3cf397e27 /web | |
parent | f99ef319fdd6df152d7791f8e451d8503611e583 (diff) | |
download | aur-549bae520ab634ee0f675199602d7572bd631b4b.tar.gz aur-549bae520ab634ee0f675199602d7572bd631b4b.tar.xz |
made author's name in comment a link to his profile
Diffstat (limited to 'web')
-rw-r--r-- | web/lib/pkgfuncs.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index ff7229ff..7117c8e6 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -189,7 +189,7 @@ function package_comments($pkgid=0) { $comments = array(); if ($pkgid) { $dbh = db_connect(); - $q = "SELECT PackageComments.ID, UserName, Comments, CommentTS "; + $q = "SELECT PackageComments.ID, UserName, UsersID, Comments, CommentTS "; $q.= "FROM PackageComments, Users "; $q.= "WHERE PackageComments.UsersID = Users.ID"; $q.= " AND PackageID = ".mysql_escape_string($pkgid); @@ -502,9 +502,15 @@ function package_details($id=0, $SID="") { print $durl . " "; } - print __("Comment by: %h%s%h on %h%s%h", + if ($SID) { + print __("Comment by: %h%s%h on %h%s%h", + array("<a href='/account.php?Action=AccountInfo&ID=".$carr["UsersID"]."'><b>",$carr["UserName"],"</b></a>", + "<i>",date("Ymd [H:i:s]",$carr["CommentTS"]),"</i>")); + } else { + print __("Comment by: %h%s%h on %h%s%h", array("<b>",$carr["UserName"],"</b>", "<i>",date("Ymd [H:i:s]",$carr["CommentTS"]),"</i>")); + } print "</span>"; print "<tr><td class='boxSoft'>"; print "<code>\n"; |