From 549bae520ab634ee0f675199602d7572bd631b4b Mon Sep 17 00:00:00 2001 From: swiergot Date: Sun, 14 Aug 2005 12:21:59 +0000 Subject: made author's name in comment a link to his profile --- web/lib/pkgfuncs.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'web/lib/pkgfuncs.inc') 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("",$carr["UserName"],"", + "",date("Ymd [H:i:s]",$carr["CommentTS"]),"")); + } else { + print __("Comment by: %h%s%h on %h%s%h", array("",$carr["UserName"],"", "",date("Ymd [H:i:s]",$carr["CommentTS"]),"")); + } print ""; print ""; print "\n"; -- cgit v1.2.3-24-g4f1b