summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-04-20 08:42:56 +0200
committerlpsolit%gmail.com <>2005-04-20 08:42:56 +0200
commit57394ff026769d28ef6b5d077cb4655adf032936 (patch)
tree780e1e6b6069ae190fcaf7f509ef69274dfd91ee /CGI.pl
parent3e681ef2457ac8205f95b48e42922b17153180e2 (diff)
downloadbugzilla-57394ff026769d28ef6b5d077cb4655adf032936.tar.gz
bugzilla-57394ff026769d28ef6b5d077cb4655adf032936.tar.xz
Bug 290513: Move CheckIfVotedConfirmed() out of CGI.pl - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wicked a=myk
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl39
1 files changed, 0 insertions, 39 deletions
diff --git a/CGI.pl b/CGI.pl
index ec0d8909c..d2a6b50ef 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -211,45 +211,6 @@ sub PutFooter {
|| ThrowTemplateError($::template->error());
}
-sub CheckIfVotedConfirmed {
- my ($id, $who) = (@_);
- PushGlobalSQLState();
- SendSQL("SELECT bugs.votes, bugs.bug_status, products.votestoconfirm, " .
- " bugs.everconfirmed, NOW() " .
- "FROM bugs INNER JOIN products ON products.id = bugs.product_id " .
- "WHERE bugs.bug_id = $id");
- my ($votes, $status, $votestoconfirm, $everconfirmed, $timestamp) = (FetchSQLData());
- my $sql_timestamp = SqlQuote($timestamp);
- my $ret = 0;
- if ($votes >= $votestoconfirm && $status eq 'UNCONFIRMED') {
- SendSQL("UPDATE bugs SET bug_status = 'NEW', everconfirmed = 1, " .
- "delta_ts = $sql_timestamp WHERE bug_id = $id");
- my $fieldid = GetFieldID("bug_status");
- SendSQL("INSERT INTO bugs_activity " .
- "(bug_id, who, bug_when, fieldid, removed, added) VALUES " .
- "($id, $who, $sql_timestamp, $fieldid, 'UNCONFIRMED', 'NEW')");
- if (!$everconfirmed) {
- $fieldid = GetFieldID("everconfirmed");
- SendSQL("INSERT INTO bugs_activity " .
- "(bug_id, who, bug_when, fieldid, removed, added) VALUES " .
- "($id, $who, $sql_timestamp, $fieldid, '0', '1')");
- }
-
- AppendComment($id, DBID_to_name($who),
- "*** This bug has been confirmed by popular vote. ***",
- 0, $timestamp);
-
- $vars->{'type'} = "votes";
- $vars->{'id'} = $id;
- $vars->{'mailrecipients'} = { 'changer' => $who };
-
- $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) = @_;
# in the case of CCs, deps, and keywords, there's a possibility that someone