diff options
author | Struan Donald <struan@exo.org.uk> | 2011-06-27 09:18:18 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-06-27 09:18:18 +0100 |
commit | b483a17c13ba8e273949ce4ee8c8c05e66b06647 (patch) | |
tree | 3e928fa68c3edb90c0666ec52ad8c9982f9dab77 /perllib/FixMyStreet/App/Controller/Report/New.pm | |
parent | 8deb709fa2d44bcbaba54734f7f4f4385980d8df (diff) | |
parent | 62ffebc89cc66d32a828ea1de8c850c3e950faa1 (diff) |
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into new_statuses
Conflicts:
perllib/FixMyStreet/DB/Result/Comment.pm
perllib/FixMyStreet/DB/Result/User.pm
web/css/core.css
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 130eee858..a6be6c90c 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -28,8 +28,6 @@ Create a new report, or complete a partial one . =head2 flow control -submit_map: true if we reached this page by clicking on the map - submit_problem: true if a problem has been submitted =head2 location (required) @@ -564,7 +562,7 @@ sub process_user : Private { unless $report->user; # set the user's name and phone (if given) - $report->user->name( Utils::trim_text( $params{name} ) ); + $report->user->name( Utils::trim_text( $params{name} ) ) if $params{name}; $report->user->phone( Utils::trim_text( $params{phone} ) ); return 1; @@ -912,9 +910,12 @@ sub redirect_or_confirm_creation : Private { } # otherwise create a confirm token and email it to them. - my $token = - $c->model("DB::Token") - ->create( { scope => 'problem', data => $report->id } ); + my $token = $c->model("DB::Token")->create( { + scope => 'problem', + data => { + id => $report->id + } + } ); $c->stash->{token_url} = $c->uri_for_email( '/P', $token->token ); $c->send_email( 'problem-confirm.txt', { to => [ [ $report->user->email, $report->name ] ], |