aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-07 17:11:50 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-07 17:11:50 +0100
commit891428159dd27e5648676b7b9b51c5a2fe2f83ed (patch)
tree1aa9862e3ab0cd981f0979ce1b29610e4b967657 /perllib/FixMyStreet/App.pm
parent0f7de6563d4c96fa1ec9c429cca7e42259e25422 (diff)
Remove fake_q and most of now-unused Page.pm.
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r--perllib/FixMyStreet/App.pm37
1 files changed, 0 insertions, 37 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index ec7ec3ff0..09a8609fe 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -11,7 +11,6 @@ use mySociety::Email;
use mySociety::EmailUtil;
use mySociety::Random qw(random_bytes);
use FixMyStreet::Map;
-use FixMyStreet::FakeQ;
use URI;
use URI::QueryParam;
@@ -133,11 +132,6 @@ sub _get_cobrand {
my $cobrand = $cobrand_class->new( { request => $c->req } );
- # create the cobrand explicitly passing in the site. Avoids the chicken and
- # egg situation where one needs to be created first. Should disappear when
- # all instances of the old '$q' are gone.
- $cobrand->fake_q( $c->fake_q( { site => $cobrand->moniker } ) );
-
return $cobrand;
}
@@ -390,37 +384,6 @@ sub uri_for_email {
return URI->new($email_uri);
}
-=head2 fake_q
-
- $q = $c->fake_q(); # normal usage
- $q = $c->fake_q( { site => 'cobrand_moniker' } ); # when creating
-
-Returns a faked up object that behaves as the old code expects the old '$q' to
-behave. Object is cached for the request. See L<FixMyStreet::FakeQ> for more
-details.
-
-The first time fake_q is called you need to pass in 'site' explicitly. This
-should normally be done automatically when the cobrand is first loaded.
-
-=cut
-
-sub fake_q {
- my $c = shift;
- my $args = shift;
-
- return $c->stash->{fakeq} #
- ||= $c->_get_fake_q($args);
-}
-
-sub _get_fake_q {
- my $c = shift;
- my $args = shift || {};
-
- $args->{params} ||= $c->req->parameters;
-
- return FixMyStreet::FakeQ->new($args);
-}
-
=head1 SEE ALSO
L<FixMyStreet::App::Controller::Root>, L<Catalyst>