diff options
author | Struan Donald <struan@exo.org.uk> | 2012-08-22 10:57:10 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-08-22 10:57:10 +0100 |
commit | 2e0a4e8ec45579e4e5c9cf8aa123d5ab215b9703 (patch) | |
tree | c13e3c59b686e01460dc7960547f7e9c53c288bd /perllib/FixMyStreet/App/Controller/Tokens.pm | |
parent | b99c5ff97b29a27eeba52ed24385ac30388e875c (diff) | |
parent | 88a7d38dffa3dabdf0f85573b254cea9c8ab232b (diff) |
Merge remote-tracking branch 'origin/master' into fmb-read-only
Conflicts:
.gitignore
bin/make_css
conf/general.yml-example
perllib/FixMyStreet/App/Controller/Council.pm
perllib/FixMyStreet/App/Controller/Report/New.pm
perllib/FixMyStreet/Cobrand/Default.pm
templates/web/default/around/around_index.html
templates/web/default/index.html
templates/web/emptyhomes/index.html
templates/web/fixmystreet/around/around_index.html
templates/web/fixmystreet/index.html
web/fixmystreet_app_cgi.cgi
web/fixmystreet_app_fastcgi.cgi
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Tokens.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Tokens.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm index 1434838f2..03dc69b00 100644 --- a/perllib/FixMyStreet/App/Controller/Tokens.pm +++ b/perllib/FixMyStreet/App/Controller/Tokens.pm @@ -34,7 +34,8 @@ sub confirm_problem : Path('/P') { # Load the problem my $data = $auth_token->data; my $problem_id = ref $data ? $data->{id} : $data; - my $problem = $c->cobrand->problems->find( { id => $problem_id } ) + # Look at all problems, not just cobrand, in case am approving something we don't actually show + my $problem = $c->model('DB::Problem')->find( { id => $problem_id } ) || $c->detach('token_error'); $c->stash->{problem} = $problem; @@ -78,7 +79,7 @@ sub confirm_problem : Path('/P') { $c->set_session_cookie_expire(0); if ( FixMyStreet::DB::Result::Problem->visible_states()->{$old_state} ) { - my $report_uri = $c->uri_for( '/report', $problem->id ); + my $report_uri = $c->cobrand->base_url_for_report( $problem ) . $problem->url; $c->res->redirect($report_uri); } |