aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/My.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/My.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/My.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/My.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm
index b3d341a68..83d5f7adb 100644
--- a/perllib/FixMyStreet/App/Controller/My.pm
+++ b/perllib/FixMyStreet/App/Controller/My.pm
@@ -25,8 +25,8 @@ sub my : Path : Args(0) {
$c->detach( '/auth/redirect' ) unless $c->user;
- my $p_page = $c->req->params->{p} || 1;
- my $u_page = $c->req->params->{u} || 1;
+ my $p_page = $c->get_param('p') || 1;
+ my $u_page = $c->get_param('u') || 1;
$c->forward( '/reports/stash_report_filter_status' );
@@ -42,7 +42,7 @@ sub my : Path : Args(0) {
%$params
} if $c->cobrand->problems_clause;
- my $category = $c->req->param('filter_category');
+ my $category = $c->get_param('filter_category');
if ( $category ) {
$params->{category} = $category;
$c->stash->{filter_category} = $category;