|
From: Benjamin C. <bc...@us...> - 2001-07-18 13:55:23
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv5149
Modified Files:
bug.php
Log Message:
Remove the comments from the notification email if no comments were added when the bug is changed
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- bug.php 2001/07/17 04:19:48 1.13
+++ bug.php 2001/07/18 13:55:19 1.14
@@ -40,11 +40,12 @@
}
///
-/// Send the email about changes to the bug and (later) log the changes in the DB
+/// Send the email about changes to the bug and log the changes in the DB
function do_changedfields($userid, $buginfo, $cf, $comments) {
global $q, $t, $u, $select, $now;
$t->set_file('emailout','bugemail.txt');
+ $t->set_block('emailout','commentblock', 'cblock');
foreach(array('Title','URL') as $field) {
if (isset($cf[$field])) {
$q->query("insert into BugHistory (BugID, ChangedField, OldValue, NewValue, CreatedBy, CreatedDate) values ({$buginfo['BugID']}, '$field', '$buginfo[$field]', '$cf[$field]', $u, $now)");
@@ -118,7 +119,10 @@
'oldcomments' => textwrap(stripslashes($row['Text']),72)
));
}
- }
+ $t->parse('cblock', 'commentblock', true);
+ } else {
+ $t->set_var('cblock', '');
+ }
// Don't email the person who just made the changes (later, make this
// behavior toggable by the user)
|