aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authormatthew <matthew>2007-03-13 22:56:14 +0000
committermatthew <matthew>2007-03-13 22:56:14 +0000
commit892bb80635f54d1c9bda9fbaf7cfe5d35a35bad4 (patch)
treec4495a25eab263786c8a5c69143bda7729e98b1d /web
parent160ad81cfba0a9de277a44804ed2a0ef96757cf3 (diff)
Only confirm unconfirmed, it might already be hidden I guess.
Diffstat (limited to 'web')
-rwxr-xr-xweb/confirm.cgi6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/confirm.cgi b/web/confirm.cgi
index ab4fdcae3..7c695d589 100755
--- a/web/confirm.cgi
+++ b/web/confirm.cgi
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: confirm.cgi,v 1.10 2007-02-27 01:36:09 matthew Exp $
+# $Id: confirm.cgi,v 1.11 2007-03-13 22:56:14 matthew Exp $
use strict;
require 5.8.0;
@@ -43,7 +43,7 @@ sub main {
my $id = mySociety::AuthToken::retrieve($type, $token);
if ($id) {
if ($type eq 'update') {
- dbh()->do("update comment set state='confirmed' where id=?", {}, $id);
+ dbh()->do("update comment set state='confirmed' where id=? and state='unconfirmed'", {}, $id);
my ($email) = dbh()->selectrow_array("select email from comment where id=?", {}, $id);
my ($problem_id, $fixed, $reopen) = dbh()->selectrow_array("select problem_id,mark_fixed,mark_open from comment where id=?", {}, $id);
if ($fixed) {
@@ -69,7 +69,7 @@ or
</form>
EOF
} elsif ($type eq 'problem') {
- dbh()->do("update problem set state='confirmed' where id=?", {}, $id);
+ dbh()->do("update problem set state='confirmed' where id=? and state='unconfirmed'", {}, $id);
my $email = dbh()->selectrow_array("select email from problem where id=?", {}, $id);
my $salt = unpack('h*', random_bytes(8));
my $secret = scalar(dbh()->selectrow_array('select secret from secret'));