diff options
Diffstat (limited to 'web')
-rwxr-xr-x | web/confirm.cgi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/confirm.cgi b/web/confirm.cgi index cc0e21a04..09022ed7d 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.13 2007-05-01 16:24:40 matthew Exp $ +# $Id: confirm.cgi,v 1.14 2007-05-03 09:34:22 matthew Exp $ use strict; require 5.8.0; @@ -66,7 +66,8 @@ EOF $out .= $q->p(sprintf(_('You could also <a href="%s">subscribe to the RSS feed</a> of updates by other local people on this problem, or %s if you wish to receive updates by email.'), "/rss/$problem_id", $signup)); $out .= '</form>'; } elsif ($type eq 'problem') { - dbh()->do("update problem set state='confirmed' where id=? and state='unconfirmed'", {}, $id); + dbh()->do("update problem set state='confirmed',confirmed=ms_current_timestamp() + where id=? and state='unconfirmed'", {}, $id); my ($email, $council) = dbh()->selectrow_array("select email, council from problem where id=?", {}, $id); my $salt = unpack('h*', random_bytes(8)); my $secret = scalar(dbh()->selectrow_array('select secret from secret')); @@ -99,6 +100,7 @@ EOF print Page::header($q, _('Confirmation')); print $out; print Page::footer(); + dbh()->rollback(); } Page::do_fastcgi(\&main); |