aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/Update.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-03-20 10:14:49 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-03-20 10:14:49 +0000
commitbad46497ed36bde38a32cd885b6317f9139b0f31 (patch)
treebcecfefd196898398e7e1323d3b4ac8a7fe84dab /perllib/FixMyStreet/App/Controller/Report/Update.pm
parentff2a390dda475c24607365103e3ef72adc73aa63 (diff)
parent79bbd50afd3b02144cd0e1441b54a329e5e0c04f (diff)
Merge branch 'store-contributed-as'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/Update.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm
index 99eae8659..9d97688c5 100644
--- a/perllib/FixMyStreet/App/Controller/Report/Update.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm
@@ -444,9 +444,17 @@ sub save_update : Private {
if ( $c->cobrand->never_confirm_updates ) {
$update->user->update_or_insert;
$update->confirm();
- } elsif ( $c->forward('/report/new/created_as_someone_else', [ $update->problem->bodies_str ]) ) {
- # If created on behalf of someone else, we automatically confirm it,
- # but we don't want to update the user account
+ # If created on behalf of someone else, we automatically confirm it,
+ # but we don't want to update the user account
+ } elsif ($c->stash->{contributing_as_another_user}) {
+ $update->set_extra_metadata( contributed_as => 'another_user');
+ $update->set_extra_metadata( contributed_by => $c->user->id );
+ $update->confirm();
+ } elsif ($c->stash->{contributing_as_body}) {
+ $update->set_extra_metadata( contributed_as => 'body' );
+ $update->confirm();
+ } elsif ($c->stash->{contributing_as_anonymous_user}) {
+ $update->set_extra_metadata( contributed_as => 'anonymous_user' );
$update->confirm();
} elsif ( !$update->user->in_storage ) {
# User does not exist.