summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorswiergot <swiergot>2005-08-14 14:21:59 +0200
committerswiergot <swiergot>2005-08-14 14:21:59 +0200
commit549bae520ab634ee0f675199602d7572bd631b4b (patch)
treec272c0fd364e2358b0f2ec471ec6b1e3cf397e27 /web
parentf99ef319fdd6df152d7791f8e451d8503611e583 (diff)
downloadaur-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.inc10
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 . "&nbsp;&nbsp;";
}
- 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";