aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App')
-rw-r--r--perllib/FixMyStreet/App/Controller/Alert.pm20
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm4
-rw-r--r--perllib/FixMyStreet/App/Controller/Location.pm2
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm2
4 files changed, 11 insertions, 17 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm
index b3067abc9..b5258ae79 100644
--- a/perllib/FixMyStreet/App/Controller/Alert.pm
+++ b/perllib/FixMyStreet/App/Controller/Alert.pm
@@ -86,7 +86,6 @@ sub rss : Private {
$c->go('list');
}
- my $extra_params = $c->cobrand->extra_params( $c->fake_q );
my $url;
if ( $feed =~ /^area:(?:\d+:)+(.*)$/ ) {
( my $id = $1 ) =~ tr{:_}{/+};
@@ -363,27 +362,22 @@ sub setup_coordinate_rss_feeds : Private {
my $rss_feed;
if ( $c->stash->{pretty_pc_text} ) {
- $rss_feed =
- $c->cobrand->uri( "/rss/pc/" . $c->stash->{pretty_pc_text},
- $c->fake_q );
+ $rss_feed = $c->uri_for( "/rss/pc/" . $c->stash->{pretty_pc_text} );
}
else {
- $rss_feed = $c->cobrand->uri(
+ $rss_feed = $c->uri_for(
sprintf( "/rss/l/%s,%s",
$c->stash->{latitude},
- $c->stash->{longitude} ),
- $c->fake_q
+ $c->stash->{longitude} )
);
}
$c->stash->{rss_feed_uri} = $rss_feed;
- $c->stash->{rss_feed_2k} = $c->cobrand->uri( $rss_feed . '/2', $c->fake_q );
- $c->stash->{rss_feed_5k} = $c->cobrand->uri( $rss_feed . '/5', $c->fake_q );
- $c->stash->{rss_feed_10k} =
- $c->cobrand->uri( $rss_feed . '/10', $c->fake_q );
- $c->stash->{rss_feed_20k} =
- $c->cobrand->uri( $rss_feed . '/20', $c->fake_q );
+ $c->stash->{rss_feed_2k} = $c->uri_for( $rss_feed . '/2' );
+ $c->stash->{rss_feed_5k} = $c->uri_for( $rss_feed . '/5' );
+ $c->stash->{rss_feed_10k} = $c->uri_for( $rss_feed . '/10' );
+ $c->stash->{rss_feed_20k} = $c->uri_for( $rss_feed . '/20' );
return 1;
}
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index 4aa37aa08..c554b2bb7 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -171,7 +171,7 @@ sub display_location : Private {
# get the map features
my ( $on_map_all, $on_map, $around_map, $distance ) =
- FixMyStreet::Map::map_features( $c->fake_q, $latitude, $longitude,
+ FixMyStreet::Map::map_features( $c, $latitude, $longitude,
$interval );
# copy the found reports to the stash
@@ -266,7 +266,7 @@ sub ajax : Path('/ajax') {
# extract the data from the map
my ( $pins, $on_map, $around_map, $dist ) =
- FixMyStreet::Map::map_pins( $c->fake_q, $x, $y, $sx, $sy, $interval );
+ FixMyStreet::Map::map_pins( $c, $x, $y, $sx, $sy, $interval );
# render templates to get the html
# my $on_map_list_html = $c->forward(
diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm
index 76f54e7b3..c1b119074 100644
--- a/perllib/FixMyStreet/App/Controller/Location.pm
+++ b/perllib/FixMyStreet/App/Controller/Location.pm
@@ -65,7 +65,7 @@ sub determine_location_from_pc : Private {
$c->stash->{pc} = $pc; # for template
my ( $latitude, $longitude, $error ) =
- eval { FixMyStreet::Geocode::lookup( $pc, $c->fake_q ) };
+ eval { FixMyStreet::Geocode::lookup( $pc, $c ) };
# Check that nothing blew up
if ($@) {
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index 63aade4c9..b5f6e341d 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -104,7 +104,7 @@ Return a pretty version of the epoch.
sub prettify_epoch {
my ( $self, $c, $epoch, $short_bool ) = @_;
- return Page::prettify_epoch( $c->req, $epoch, $short_bool );
+ return Page::prettify_epoch( $epoch, $short_bool );
}
=head2 add_links