diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-01-14 15:06:30 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-01-14 15:06:30 +0000 |
commit | bf02c4012129b1f398bcd3e0c58e6ad92893b32f (patch) | |
tree | 53dc7566370e3f0cb5791a0cba56dc9b6fb7f655 | |
parent | c95bec6b208a4b05a36161ac6a2c197a35bcb160 (diff) |
Move rotate photo handling earlier so that Zurich can use it.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 0a2a8830c..9f6b23f0d 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -590,11 +590,7 @@ sub report_edit : Path('report_edit') : Args(1) { my $site_restriction = $c->cobrand->site_restriction; - my $problem = $c->cobrand->problems->search( - { - id => $id, - } - )->first; + my $problem = $c->cobrand->problems->search( { id => $id } )->first; $c->detach( '/page_error_404_not_found' ) unless $problem; @@ -603,6 +599,11 @@ sub report_edit : Path('report_edit') : Args(1) { $c->forward('get_token'); + if ( $c->req->param('rotate_photo') ) { + $c->forward('rotate_photo'); + return 1; + } + if ( $c->cobrand->moniker eq 'zurich' ) { my $done = $c->cobrand->admin_report_edit(); return if $done; @@ -636,9 +637,6 @@ sub report_edit : Path('report_edit') : Args(1) { elsif ( $c->req->param('banuser') ) { $c->forward('ban_user'); } - elsif ( $c->req->param('rotate_photo') ) { - $c->forward('rotate_photo'); - } elsif ( $c->req->param('submit') ) { $c->forward('check_token'); |