From 2c8ad01edb6ac6e8f040e302c14aa0e1ad140ef2 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Sun, 9 Jan 2005 02:22:44 +0000 Subject: Patch for bug 277013: provides a fix for the SQL error that appears when a user's vote confirms a bug; patch by Frédéric Buclin , r=wurblzap, a=justdave. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CGI.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CGI.pl') diff --git a/CGI.pl b/CGI.pl index 19ae5da49..ecfa670a4 100644 --- a/CGI.pl +++ b/CGI.pl @@ -250,6 +250,7 @@ sub CheckIfVotedConfirmed { "FROM bugs, products " . "WHERE bugs.bug_id = $id AND products.id = bugs.product_id"); my ($votes, $status, $votestoconfirm, $everconfirmed) = (FetchSQLData()); + my $ret = 0; if ($votes >= $votestoconfirm && $status eq $::unconfirmedstate) { SendSQL("UPDATE bugs SET bug_status = 'NEW', everconfirmed = 1 " . "WHERE bug_id = $id"); @@ -273,9 +274,10 @@ sub CheckIfVotedConfirmed { $template->process("bug/process/results.html.tmpl", $vars) || ThrowTemplateError($template->error()); + $ret = 1; } PopGlobalSQLState(); - + return $ret; } sub LogActivityEntry { my ($i,$col,$removed,$added,$whoid,$timestamp) = @_; -- cgit v1.2.3-24-g4f1b