summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
authorMarcel Korpel <marcel.korpel@gmail.com>2015-07-10 18:47:33 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-08-08 12:59:24 +0200
commit9cde6b0566390002d167703fa900129bb90e07d8 (patch)
tree0363e9d33c2db381e7448ef6ddeffcdb6bfb7266 /web/lib
parente331ce273cab901726983e18249e0bb3455fc463 (diff)
downloadaur-9cde6b0566390002d167703fa900129bb90e07d8.tar.gz
aur-9cde6b0566390002d167703fa900129bb90e07d8.tar.xz
Show dateline when a comment is edited or deleted
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/pkgbasefuncs.inc.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php
index 1ae31665..6057d104 100644
--- a/web/lib/pkgbasefuncs.inc.php
+++ b/web/lib/pkgbasefuncs.inc.php
@@ -47,9 +47,12 @@ function pkgbase_comments($base_id, $limit, $include_deleted) {
}
$dbh = DB::connect();
- $q = "SELECT PackageComments.ID, UserName, UsersID, Comments, ";
- $q.= "CommentTS, DelUsersID FROM PackageComments LEFT JOIN Users ";
- $q.= "ON PackageComments.UsersID = Users.ID ";
+ $q = "SELECT PackageComments.ID, A.UserName AS UserName, UsersID, Comments, ";
+ $q.= "CommentTS, EditedTS, B.UserName AS EditUserName, ";
+ $q.= "DelUsersID, C.UserName AS DelUserName FROM PackageComments ";
+ $q.= "LEFT JOIN Users A ON PackageComments.UsersID = A.ID ";
+ $q.= "LEFT JOIN Users B ON PackageComments.EditedUsersID = B.ID ";
+ $q.= "LEFT JOIN Users C ON PackageComments.DelUsersID = C.ID ";
$q.= "WHERE PackageBaseID = " . $base_id . " ";
if (!$include_deleted) {
$q.= "AND DelUsersID IS NULL ";