diff options
author | matthew <matthew> | 2007-03-27 14:54:33 +0000 |
---|---|---|
committer | matthew <matthew> | 2007-03-27 14:54:33 +0000 |
commit | 5a2596672084523a6dac37683f86af8791214ca5 (patch) | |
tree | 96a5dfa7e061be1a39017c218d3dde4bf786ab94 | |
parent | 42abc62fb7ef15c752a5c4d20f15469ac323ee45 (diff) |
Show uptodate after update.
-rwxr-xr-x | web-admin/index.cgi | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/web-admin/index.cgi b/web-admin/index.cgi index ef7e75977..91f50701b 100755 --- a/web-admin/index.cgi +++ b/web-admin/index.cgi @@ -7,10 +7,10 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: index.cgi,v 1.21 2007-03-27 14:50:07 matthew Exp $ +# $Id: index.cgi,v 1.22 2007-03-27 14:54:33 matthew Exp $ # -my $rcsid = ''; $rcsid .= '$Id: index.cgi,v 1.21 2007-03-27 14:50:07 matthew Exp $'; +my $rcsid = ''; $rcsid .= '$Id: index.cgi,v 1.22 2007-03-27 14:54:33 matthew Exp $'; use strict; @@ -235,26 +235,30 @@ sub do_council_contacts ($$) { my $confirmed = $l->{confirmed}; if ($cats{$cat} && !$confirmed) { $l->{confirmed} = 1; + $l->{note} = 'Confirmed'; + $l->{editor} = $q->remote_user() || "*unknown*"; + $l->{whenedited} = 'Now'; dbh()->do("update contacts set confirmed = 't', editor = ?, whenedited = ms_current_timestamp(), note = 'Confirmed' where area_id = ? and category = ? - ", {}, - ($q->remote_user() || "*unknown*"), + ", {}, $l->{editor}, $area_id, $cat ); } elsif (!$cats{$cat} && $confirmed) { $l->{confirmed} = undef; + $l->{note} = 'Unconfirmed'; + $l->{editor} = $q->remote_user() || "*unknown*"; + $l->{whenedited} = 'Now'; dbh()->do("update contacts set confirmed = 'f', editor = ?, whenedited = ms_current_timestamp(), note = 'Unconfirmed' where area_id = ? and category = ? - ", {}, - ($q->remote_user() || "*unknown*"), + ", {}, $l->{editor}, $area_id, $cat ); } |