diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-07 23:55:54 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-07 23:55:54 +0100 |
commit | 614abaa627d3f9dfe14efcb994cdcfc0146a623d (patch) | |
tree | 5014f3c8d2e36f9b943f4262c11484e96b90b354 /perllib/CrossSell.pm | |
parent | cecf86128b3825f92faa6cc222a6cc777293adff (diff) |
Removal of old Cobrand.pm and last .
Diffstat (limited to 'perllib/CrossSell.pm')
-rw-r--r-- | perllib/CrossSell.pm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/perllib/CrossSell.pm b/perllib/CrossSell.pm index e40f2166f..44f971462 100644 --- a/perllib/CrossSell.pm +++ b/perllib/CrossSell.pm @@ -197,14 +197,14 @@ EOF # Choose appropriate advert and display it. # $this_site is to stop a site advertising itself. sub display_advert ($$;$%) { - my ($q, $email, $name, %data) = @_; + my ($c, $email, $name, %data) = @_; - return '' unless $q->{site} eq 'fixmystreet'; + return '' unless $c->cobrand->is_default; if (defined $data{council} && $data{council} eq '2326') { my ($out, $ad) = display_hfyc_cheltenham_advert($email, $name); if ($out) { - $q->{scratch} = "advert=$ad"; + $c->stash->{scratch} = "advert=$ad"; return $out; } } @@ -212,17 +212,17 @@ sub display_advert ($$;$%) { #if ($data{lat}) { # my $out = display_gny_groups($data{lon}, $data{lat}); # if ($out) { - # $q->{scratch} = 'advert=gnygroups'; + # $c->stash->{scratch} = 'advert=gnygroups'; # return '<div style="margin: 0 5em; border-top: dotted 1px #666666;">' # . $out . '</div>'; # } #} - #$q->{scratch} = 'advert=demclub0'; + #$c->stash->{scratch} = 'advert=demclub0'; #return display_democracyclub(); #unless (defined $data{done_tms} && $data{done_tms}==1) { - $q->{scratch} = 'advert=news'; + $c->stash->{scratch} = 'advert=news'; my $auth_signature = ''; unless (defined $data{emailunvalidated} && $data{emailunvalidated}==1) { $auth_signature = mySociety::AuthToken::sign_with_shared_secret($email, mySociety::Config::get('AUTH_SHARED_SECRET')); @@ -250,7 +250,7 @@ sub display_advert ($$;$%) { my $out = &$func($email, $name, $advert_text); use strict 'refs'; if ($out) { - $q->{scratch} = "advert=$advert_id"; + $c->stash->{scratch} = "advert=$advert_id"; return $out; } @@ -260,7 +260,7 @@ sub display_advert ($$;$%) { } } - $q->{scratch} = 'advert=pb'; + $c->stash->{scratch} = 'advert=pb'; return <<EOF; <div id="advert_thin" style="text-align:center"> <h2 style="font-size: 150%"> |