aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Questionnaire.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-07-10 14:38:17 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-07-14 18:25:19 +0100
commit67823bc788ce744e1228a8602b9a5aa805771ced (patch)
tree0b1eddd4e071314573e52206d0061cab022e1cd0 /perllib/FixMyStreet/App/Controller/Questionnaire.pm
parenteed6158981240afce10824e82fa86f14b38f3167 (diff)
Centralise update creation to include fields.
Given the user, we can infer the name if not provided, and the extra data if a staff user. We can also provide defaults for various other fields. Always have superuser take precedence over from_body.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Questionnaire.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Questionnaire.pm4
1 files changed, 0 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
index ab6117ae4..ef6152c30 100755
--- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm
+++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
@@ -206,16 +206,12 @@ sub submit_standard : Private {
$update = $c->model('DB::Comment')->new(
{
problem => $problem,
- name => $problem->name,
user => $problem->user,
text => $update,
- state => 'confirmed',
mark_fixed => $c->stash->{new_state} eq 'fixed - user' ? 1 : 0,
mark_open => $c->stash->{new_state} eq 'confirmed' ? 1 : 0,
lang => $c->stash->{lang_code},
cobrand => $c->cobrand->moniker,
- cobrand_data => '',
- confirmed => \'current_timestamp',
anonymous => $problem->anonymous,
}
);