com web/bugs: - Fixed mail author in the automatic bug closing: include/functions.php www/rpc.php

From: Date: Tue, 18 Sep 2012 11:23:19 +0000
Subject: com web/bugs: - Fixed mail author in the automatic bug closing: include/functions.php www/rpc.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-14729@lists.php.net to get a copy of this message
Commit: 74f3aa9d5fc4f415ef3d42d1c7e9db1619fdace5 Author: Felipe Pena <felipensp@gmail.com> Tue, 18 Sep 2012 08:23:19 -0300 Parents: 8a5ce16c355f89a13a2b477131cce916d4cdc0cd Branches: master Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=74f3aa9d5fc4f415ef3d42d1c7e9db1619fdace5 Log: - Fixed mail author in the 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 2a8647c..9cc9406 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1656,13 +1656,13 @@ function bugs_add_comment ($bug_id, $from, $from_name, $comment, $type = 'commen /** * Change bug status */ -function bugs_status_change ($bug_id, $new_status) +function bugs_status_change ($bug_id, $email, $new_status) { global $dbh; return $dbh->prepare(" - UPDATE bugdb SET status = ? WHERE id = ? LIMIT 1 - ")->execute(array($new_status, $bug_id)); + UPDATE bugdb SET status = ?, email = ? WHERE id = ? LIMIT 1 + ")->execute(array($new_status, $email, $bug_id)); } /** diff --git a/www/rpc.php b/www/rpc.php index 2c0e2a9..527d600 100644 --- a/www/rpc.php +++ b/www/rpc.php @@ -56,11 +56,12 @@ if (!empty($_POST['ncomment']) && !empty($_POST['user'])) { && $bug['status'] !== 'Closed' && $_POST['status'] === 'Closed') { /* Change the bug status to Closed */ - bugs_status_change($bug_id, 'Closed'); + bugs_status_change($bug_id, $from, 'Closed'); $in = $bug; /* Just change the bug status */ $in['status'] = $_POST['status']; + $in['email'] = $from; $changed = bug_diff($bug, $in); if (!empty($changed)) {

« previous php.webmaster (#14729) next »