cvs: bugtracker /includes bug.php
| From: | Barry Carlyon | Date: | Thu, 14 Aug 2008 09:35:27 +0000 |
| Subject: | cvs: bugtracker /includes bug.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-2421@lists.php.net to get a copy of this message | ||
bcarlyon Thu Aug 14 09:35:27 2008 UTC
Modified files:
/bugtracker/includes bug.php
Log:
Altered the bug table for a updated_by column and thus added this for updatation when a bug is
changed
http://cvs.php.net/viewvc.cgi/bugtracker/includes/bug.php?r1=1.21&r2=1.22&diff_format=u
Index: bugtracker/includes/bug.php
diff -u bugtracker/includes/bug.php:1.21 bugtracker/includes/bug.php:1.22
--- bugtracker/includes/bug.php:1.21 Thu Aug 14 09:11:59 2008
+++ bugtracker/includes/bug.php Thu Aug 14 09:35:27 2008
@@ -38,7 +38,7 @@
* @author Barry Carlyon <bcarlyon@php.net>
* @copyright 2008-2008 Barry Carlyon
* @license http://www.opensource.org/licenses/bsd-license.php
BSD License
-* @version CVS: $Id: bug.php,v 1.21 2008/08/14 09:11:59 bcarlyon Exp $
+* @version CVS: $Id: bug.php,v 1.22 2008/08/14 09:35:27 bcarlyon Exp $
* @link http://gsoc.barrycarlyon.servegame.org/
*/
@@ -129,14 +129,14 @@
function assign($target) {
global $db, $cookie, $email, $cache, $user;
- $query = 'UPDATE ' . BUG_TABLE . ' SET assigned_to = \'' . $target .
'\', assigned_on = NOW() WHERE bug_id = ' . $this->bug_id;
+ $query = 'UPDATE ' . BUG_TABLE . ' SET assigned_to = \'' . $target .
'\', assigned_on = NOW(), updated_by = \'' . $user->handle . '\'
WHERE bug_id = ' . $this->bug_id;
$db->get_data($query);
if ($db->affected_rows)
{
//check for need to update bug status
if ($this->bug_data['status'] == PENDING)
{
- $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . ASSIGNED . ' WHERE
bug_id = ' . $this->bug_id;
+ $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . ASSIGNED . ',
updated_by = \'' . $user->handle . '\' WHERE bug_id = ' .
$this->bug_id;
$this->bug_data['status'] == ASSIGNED;
$db->get_data($query);
}
@@ -163,13 +163,14 @@
if ($cache->obtain('status',$newstate))
{
if ($newstate == CLOSED || $newstate == FIXED) {
- $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . $newstate . ',
closed_by = \'' . $user->handle . '\', closed_on = NOW() WHERE bug_id =
' . $this->bug_id;
+ $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . $newstate . ',
closed_by = \'' . $user->handle . '\', closed_on = NOW()';
} elseif ($this->bug_data['closed_by']) {
//reopeneing
- $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . $newstate . ',
closed_by = \'\', closed_on = 0 WHERE bug_id = ' . $this->bug_id;
+ $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . $newstate . ',
closed_by = \'\', closed_on = 0';
} else {
- $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . $newstate . '
WHERE bug_id = ' . $this->bug_id;
+ $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . $newstate;
}
+ $query .= ', updated_by = \'' . $user->handle . '\' WHERE bug_id =
' . $this->bug_id;
$db->get_data($query);
if ($db->affected_rows)
{