|
From: Benjamin C. <bc...@us...> - 2005-05-28 18:09:47
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8913/inc Modified Files: functions.php Log Message: Fixed a bug in the bug deletion function. Added logging of database errors Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- functions.php 28 May 2005 17:53:37 -0000 1.51 +++ functions.php 28 May 2005 18:09:39 -0000 1.52 @@ -525,6 +525,7 @@ } else { show_text(htmlentities($obj->message).'<br>'.htmlentities($obj->userinfo)); } + error_log($obj->message." -- ".htmlentities($obj->userinfo)); exit; } @@ -669,7 +670,7 @@ " from ".TBL_ATTACHMENT." a, ".TBL_BUG." b". " where a.bug_id = b.bug_id and b.bug_id = ".$db->quote($bug_id)); foreach ($attary as $att) { - unlink(join('/', array(ATTACHMENT_PATH, + @unlink(join('/', array(ATTACHMENT_PATH, $att['project_id'], "$bug_id-{$att['file_name']}"))); } $db->query("delete from ".TBL_ATTACHMENT." where bug_id = ".$db->quote($bug_id)); @@ -685,13 +686,16 @@ " where bug_id = ".$db->quote($bug_id)." or depends_on = ".$db->quote($bug_id)); // Groups - $db->query("delete from ".TBL_GROUP." where bug_id = ".$db->quote($bug_id)); + $db->query("delete from ".TBL_BUG_GROUP." where bug_id = ".$db->quote($bug_id)); // Histories $db->query("delete from ".TBL_BUG_HISTORY." where bug_id = ".$db->quote($bug_id)); // Votes $db->query("delete from ".TBL_BUG_VOTE." where bug_id = ".$db->quote($bug_id)); + + // And the bug itself + $db->query("delete from ".TBL_BUG." where bug_id = ".$db->quote($bug_id)); } ?> |