diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 8ed135e6d..0a2a8830c 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -312,7 +312,7 @@ sub update_contacts : Private { my ( $self, $c ) = @_; my $posted = $c->req->param('posted'); - my $editor = $c->req->remote_user || _('*unknown*'); + my $editor = $c->req->remote_user || ($c->user && $c->user->name) || _('*unknown*'); if ( $posted eq 'new' ) { $c->forward('check_token'); @@ -661,11 +661,6 @@ sub report_edit : Path('report_edit') : Args(1) { my $flagged = $c->req->param('flagged') ? 1 : 0; my $non_public = $c->req->param('non_public') ? 1 : 0; - # Predefine the hash so it's there for lookups - # XXX Note you need to shallow copy each time you set it, due to a bug? in FilterColumn. - my $extra = $problem->extra || {}; - $extra->{internal_notes} ||= ''; - # do this here so before we update the values in problem if ( $c->req->param('anonymous') ne $problem->anonymous || $c->req->param('name') ne $problem->name @@ -673,8 +668,6 @@ sub report_edit : Path('report_edit') : Args(1) { || $c->req->param('title') ne $problem->title || $c->req->param('detail') ne $problem->detail || ($c->req->param('body') && $c->req->param('body') ne $problem->bodies_str) - || ($c->req->param('internal_notes') && $c->req->param('internal_notes') ne $extra->{internal_notes}) - || ($c->cobrand->moniker eq 'zurich' && $c->req->param('publish_photo') ne $extra->{publish_photo}) || $flagged != $problem->flagged || $non_public != $problem->non_public ) { @@ -687,19 +680,6 @@ sub report_edit : Path('report_edit') : Args(1) { $problem->state( $new_state ); $problem->name( $c->req->param('name') ); $problem->bodies_str( $c->req->param('body') ) if $c->req->param('body'); - if ($c->req->param('internal_notes')) { - $extra->{internal_notes} = $c->req->param('internal_notes'); - $problem->extra( { %$extra } ); - } - - # Zurich have photos being published or not, and third parties getting - # personal data; can't just check as with e.g. internal_notes as it's a - # checkbox and won't be set if it's not ticked - if ($c->cobrand->moniker eq 'zurich') { - $extra->{publish_photo} = $c->req->params->{publish_photo} || 0; - $extra->{third_personal} = $c->req->params->{third_personal} || 0; - $problem->extra( { %$extra } ); - } $problem->flagged( $flagged ); $problem->non_public( $non_public ); @@ -741,15 +721,6 @@ sub report_edit : Path('report_edit') : Args(1) { # do this here otherwise lastupdate and confirmed times # do not display correctly $problem->discard_changes; - - if ( $c->cobrand->moniker eq 'zurich' && $c->req->param('body') ) { - my $problem_body = $c->req->param('body'); - my $admin_body = $c->stash->{body}; - if ($admin_body->id ne $problem_body) { - $c->detach('index'); - } - } - } } |