aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-07-06 17:35:35 +0100
committerMatthew Somerville <matthew@mysociety.org>2015-07-07 14:13:18 +0100
commita978c0a1ad216f7004ef88b8a58b9731242155dc (patch)
tree58ec3daece503b314bb1dfe54ab2d0c0e80cb24e /perllib/FixMyStreet/App/Controller/Report.pm
parentbeb7e1f345ace940c542d93768ec44bfd6f5dc21 (diff)
Factor out all uses of param()/params.
Use a central get_param and get_param_list functions dependent on whether we're after a scalar or a list (almost always a scalar). This prevents any possibility of confusion where param() could return a list, or params->{} an arrayref.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 817e2a631..97250f859 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -24,7 +24,7 @@ Redirect to homepage unless C<id> parameter in query, in which case redirect to
sub index : Path('') : Args(0) {
my ( $self, $c ) = @_;
- my $id = $c->req->param('id');
+ my $id = $c->get_param('id');
my $uri =
$id
@@ -78,7 +78,7 @@ sub _display : Private {
sub support : Path('support') : Args(0) {
my ( $self, $c ) = @_;
- my $id = $c->req->param('id');
+ my $id = $c->get_param('id');
my $uri =
$id
@@ -163,7 +163,7 @@ sub format_problem_for_display : Private {
map { Utils::truncate_coordinate($_) }
( $problem->latitude, $problem->longitude );
- unless ( $c->req->param('submit_update') ) {
+ unless ( $c->get_param('submit_update') ) {
$c->stash->{add_alert} = 1;
}