diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-03-28 14:21:56 +0100 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-03-28 14:21:56 +0100 |
commit | 9942c5c59ab28d0441ea5ba49a7bd426f17e45c3 (patch) | |
tree | 95449ac8b6e0f7069bdb7aa73c71ad1b1fbdf85d /perllib/FixMyStreet/App/View/Web.pm | |
parent | 632dd7b8e84faa4bcb19401678565751677729cc (diff) |
Handle problem confirmation tokens in catalyst and get all tests working
Diffstat (limited to 'perllib/FixMyStreet/App/View/Web.pm')
-rw-r--r-- | perllib/FixMyStreet/App/View/Web.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm index e5983ea23..75ca4dd81 100644 --- a/perllib/FixMyStreet/App/View/Web.pm +++ b/perllib/FixMyStreet/App/View/Web.pm @@ -66,5 +66,20 @@ sub tprintf { return sprintf $format, @args; } +=head2 display_crossell_advert + + [% display_crossell_advert( email, name ) %] + +Displays a crosssell advert if permitted by the cobrand. + +=cut + +sub display_crossell_advert { + my ( $self, $c, $email, $name ) = @_; + + return unless $c->cobrand->allow_crosssell_adverts(); + return CrossSell::display_advert( $c->req, $email, $name ); +} + 1; |