aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rwxr-xr-xweb/confirm.cgi2
-rwxr-xr-xweb/contact.cgi8
-rwxr-xr-xweb/questionnaire.cgi4
3 files changed, 7 insertions, 7 deletions
diff --git a/web/confirm.cgi b/web/confirm.cgi
index c9447d982..8e51a4555 100755
--- a/web/confirm.cgi
+++ b/web/confirm.cgi
@@ -73,7 +73,7 @@ sub confirm_update {
dbh()->do("update comment set state='hidden' where id=?", {}, $id);
return $q->p('Sorry, there has been an error confirming your update.');
} else {
- dbh()->do("update comment set state='confirmed' where id=? and state='unconfirmed'", {}, $id);
+ dbh()->do("update comment set state='confirmed', confirmed=ms_current_timestamp() where id=? and state='unconfirmed'", {}, $id);
}
my $creator_fixed = 0;
diff --git a/web/contact.cgi b/web/contact.cgi
index 891bd6abf..bb4ed4913 100755
--- a/web/contact.cgi
+++ b/web/contact.cgi
@@ -179,11 +179,11 @@ sub contact_page {
Port => mySociety::Config::get('BCI_DB_PORT', undef)
);
my $p = dbh()->selectrow_hashref(
- 'select title,detail,name,anonymous,extract(epoch from created) as created
+ 'select title,detail,name,anonymous,extract(epoch from confirmed) as confirmed
from problem where id=?', {}, $id);
if ($update_id) {
my $u = dbh()->selectrow_hashref(
- 'select comment.text, comment.name, problem.title, extract(epoch from comment.created) as created
+ 'select comment.text, comment.name, problem.title, extract(epoch from comment.confirmed) as confirmed
from comment, problem where comment.id=?
and comment.problem_id = problem.id
and comment.problem_id=?', {}, $update_id ,$id);
@@ -193,7 +193,7 @@ sub contact_page {
$intro .= $q->p(_('You are reporting the following update for being abusive, containing personal information, or similar:'));
$item_title = ent($u->{title});
$item_meta = $q->em( 'Update below added ', ($u->{name} eq '') ? 'anonymously' : "by " . ent($u->{name}),
- ' at ' . Page::prettify_epoch($q, $u->{created}));
+ ' at ' . Page::prettify_epoch($q, $u->{confirmed}));
$item_body = ent($u->{text});
$hidden_vals .= '<input type="hidden" name="update_id" value="' . $update_id . '">';
}
@@ -206,7 +206,7 @@ sub contact_page {
$item_meta = $q->em(
'Reported ',
($p->{anonymous}) ? 'anonymously' : "by " . ent($p->{name}),
- ' at ' . Page::prettify_epoch($q, $p->{created}));
+ ' at ' . Page::prettify_epoch($q, $p->{confirmed}));
$item_body = ent($p->{detail});
}
}
diff --git a/web/questionnaire.cgi b/web/questionnaire.cgi
index 60a4be188..f7b7df0e1 100755
--- a/web/questionnaire.cgi
+++ b/web/questionnaire.cgi
@@ -142,8 +142,8 @@ sub submit_questionnaire {
my $name = $problem->{anonymous} ? undef : $problem->{name};
my $update = $input{update} ? $input{update} : _('Questionnaire filled in by problem reporter');
Utils::workaround_pg_bytea("insert into comment
- (problem_id, name, email, website, text, state, mark_fixed, mark_open, photo, lang, cobrand, cobrand_data)
- values (?, ?, ?, '', ?, 'confirmed', ?, ?, ?, ?, ?, ?)", 7,
+ (problem_id, name, email, website, text, state, mark_fixed, mark_open, photo, lang, cobrand, cobrand_data, confirmed)
+ values (?, ?, ?, '', ?, 'confirmed', ?, ?, ?, ?, ?, ?, ms_current_timestamp())", 7,
$problem->{id}, $name, $problem->{email}, $update,
$new_state eq 'fixed' ? 't' : 'f', $new_state eq 'confirmed' ? 't' : 'f',
$image, $mySociety::Locale::lang, $cobrand, $cobrand_data