com web/bugs: - Fixed mail information and bug email change on automatic bug closing: include/functions.php www/rpc.php
| From: | Felipe Pena | Date: | Wed, 19 Sep 2012 13:51:34 +0000 |
| Subject: | com web/bugs: - Fixed mail information and bug email change on automatic bug closing: include/functions.php www/rpc.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-14734@lists.php.net to get a copy of this message | ||
Commit: fd5ae6346671b09b78652216e868f77f791fe496
Author: Felipe Pena <felipensp@gmail.com> Wed, 19 Sep 2012 10:51:34 -0300
Parents: 74f3aa9d5fc4f415ef3d42d1c7e9db1619fdace5
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=fd5ae6346671b09b78652216e868f77f791fe496
Log:
- Fixed mail information and bug email change on automatic bug closing
Changed paths:
M include/functions.php
M www/rpc.php
Diff:
diff --git a/include/functions.php b/include/functions.php
index 9cc9406..64fdc9d 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1661,7 +1661,7 @@ function bugs_status_change ($bug_id, $email, $new_status)
global $dbh;
return $dbh->prepare("
- UPDATE bugdb SET status = ?, email = ? WHERE id = ? LIMIT 1
+ UPDATE bugdb SET status = ? WHERE id = ? LIMIT 1
")->execute(array($new_status, $email, $bug_id));
}
diff --git a/www/rpc.php b/www/rpc.php
index 527d600..e67a005 100644
--- a/www/rpc.php
+++ b/www/rpc.php
@@ -56,12 +56,11 @@ if (!empty($_POST['ncomment']) &&
!empty($_POST['user'])) {
&& $bug['status'] !== 'Closed'
&& $_POST['status'] === 'Closed') {
/* Change the bug status to Closed */
- bugs_status_change($bug_id, $from, 'Closed');
+ bugs_status_change($bug_id, 'Closed');
$in = $bug;
/* Just change the bug status */
$in['status'] = $_POST['status'];
- $in['email'] = $from;
$changed = bug_diff($bug, $in);
if (!empty($changed)) {
@@ -73,7 +72,7 @@ if (!empty($_POST['ncomment']) &&
!empty($_POST['user'])) {
}
/* Send a mail notification when automatically closing a bug */
- mail_bug_updates($bug, $in, $from, $ncomment, 2, $bug_id);
+ mail_bug_updates($bug, $in, $from, $ncomment, 1, $bug_id);
}
echo json_encode(array('result' => array('status' => $bug)));