aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorM Somerville <matthew-github@dracos.co.uk>2020-08-05 17:36:18 +0100
committerM Somerville <matthew-github@dracos.co.uk>2020-08-06 20:37:12 +0100
commit615ddb00265386849f32405426c5232b9127669a (patch)
tree4f9b5183aeb650a18da9fc2c86e7739f4b315083 /perllib/FixMyStreet/App/Controller/Report.pm
parent7af4f2cc87cd6ff55501bb2856193a03fe72158c (diff)
Remove use of $c from various functions.
This means these functions can more easily be used in a non-web context.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 991064f55..81d5b18b5 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -325,7 +325,7 @@ sub format_problem_for_display : Private {
$c->res->content_type('application/json; charset=utf-8');
# encode_json doesn't like DateTime objects, so strip them out
- my $report_hashref = $c->cobrand->problem_as_hashref( $problem, $c );
+ my $report_hashref = $c->cobrand->problem_as_hashref( $problem );
delete $report_hashref->{created};
delete $report_hashref->{confirmed};
@@ -333,7 +333,7 @@ sub format_problem_for_display : Private {
my $content = $json->encode(
{
report => $report_hashref,
- updates => $c->cobrand->updates_as_hashref( $problem, $c ),
+ updates => $c->cobrand->updates_as_hashref( $problem ),
}
);
$c->res->body( $content );
@@ -354,7 +354,7 @@ sub generate_map_tags : Private {
latitude => $problem->latitude,
longitude => $problem->longitude,
pins => $problem->used_map
- ? [ $problem->pin_data($c, 'report', type => 'big', draggable => 1) ]
+ ? [ $problem->pin_data('report', type => 'big', draggable => 1) ]
: [],
);
@@ -670,7 +670,7 @@ sub _nearby_json :Private {
# Want to treat these as if they were on map
$nearby = [ map { $_->problem } @$nearby ];
my @pins = map {
- my $p = $_->pin_data($c, 'around');
+ my $p = $_->pin_data('around');
[ $p->{latitude}, $p->{longitude}, $p->{colour},
$p->{id}, $p->{title}, $pin_size, JSON->false
]