aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-11-07 12:47:49 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2012-11-07 12:48:20 -0800
commitdf5f8c78f3993b7d34323a49693d229154122113 (patch)
tree43713776dd9f136f2ddaafc1cbdcb5df3a60a134 /custom_userhistory.cgi
parentUpdate InlineHistory (diff)
downloadbugzilla-df5f8c78f3993b7d34323a49693d229154122113.tar.gz
bugzilla-df5f8c78f3993b7d34323a49693d229154122113.tar.bz2
bugzilla-df5f8c78f3993b7d34323a49693d229154122113.zip
Include attachments in user history, as well as fix some whitespace.
Diffstat (limited to 'custom_userhistory.cgi')
-rwxr-xr-xcustom_userhistory.cgi10
1 files changed, 8 insertions, 2 deletions
diff --git a/custom_userhistory.cgi b/custom_userhistory.cgi
index 6bf8ec3ca..c8db31b70 100755
--- a/custom_userhistory.cgi
+++ b/custom_userhistory.cgi
@@ -39,17 +39,23 @@ if(!$userid || !$login_name) {
my @bindValues2;
$query = sprintf
- '(SELECT bug_id,bug_when,fielddefs.name AS field '.
+ '(SELECT bug_id, bug_when, fielddefs.name AS field '.
'FROM bugs_activity JOIN fielddefs ON bugs_activity.fieldid=fielddefs.id '.
'WHERE who=? '.
'ORDER BY bug_when DESC '.
'LIMIT %d) '.
'UNION '.
- '(SELECT bug_id, bug_when, \'ZZcomment\' AS field '.
+ '(SELECT bug_id, bug_when, \'ZZcomment #\' AS field '.
'FROM longdescs '.
'WHERE who=? '.
'ORDER BY bug_when DESC '.
'LIMIT %d) '.
+ 'UNION '.
+ '(SELECT bug_id, creation_ts AS bug_when, CONCAT(\'ZZattachment #\', attach_id) AS field '.
+ 'FROM attachments'.
+ 'WHERE submitter_id=? '.
+ 'ORDER BY creation_ts DESC '.
+ 'LIMIT %d) '.
'ORDER BY bug_when DESC '.
'LIMIT %d',
$limit,$limit,$limit;