diff options
author | louise <louise> | 2009-11-11 14:10:27 +0000 |
---|---|---|
committer | louise <louise> | 2009-11-11 14:10:27 +0000 |
commit | c4591a5edce7cdb61a84abfec776fc1357d6799a (patch) | |
tree | 186b6fbbe6f7323db1ff8124d87937281b31fa87 | |
parent | 92db8d885de75e264124462af7954c74f13ab305 (diff) |
Allowing cobrand to determine display of cross sell ads
-rwxr-xr-x | web/confirm.cgi | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/web/confirm.cgi b/web/confirm.cgi index f9fe59435..f853efa0e 100755 --- a/web/confirm.cgi +++ b/web/confirm.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: confirm.cgi,v 1.60 2009-11-05 12:02:29 matthew Exp $ +# $Id: confirm.cgi,v 1.61 2009-11-11 14:10:27 louise Exp $ use strict; use Standard; @@ -96,7 +96,10 @@ sub confirm_update { my $report_url = Cobrand::url($cobrand, "/report/$problem_id#update_$id", $q); if (!$out) { $out = $q->p({class => 'confirmed'}, sprintf(_('You have successfully confirmed your update and you can now <a href="%s">view it on the site</a>.'), $report_url)); - $out .= CrossSell::display_advert($q, $email, $name); + my $display_advert = Cobrand::allow_crosssell_adverts($cobrand); + if ($display_advert) { + $out .= CrossSell::display_advert($q, $email, $name); + } my %vars = ( url_report => $report_url, url_home => Cobrand::url($cobrand, '/', $q), @@ -157,7 +160,10 @@ $q->p('<a href="/report/' . $id . '">' . _('View your report') . '</a>.'); . ($council ? _(' and <strong>we will now send it to the council</strong>') : '') . sprintf(_('. You can <a href="%s">view the problem on this site</a>.'), $report_url) ); - $out .= CrossSell::display_advert($q, $email, $name); + my $display_advert = Cobrand::allow_crosssell_adverts($cobrand); + if ($display_advert) { + $out .= CrossSell::display_advert($q, $email, $name); + } my %vars = ( url_report => $report_url, url_home => Cobrand::url($cobrand, '/', $q), @@ -219,7 +225,10 @@ sub add_questionnaire { unless $already; my $report_url = Cobrand::url($cobrand, "/report/$problem_id", $q); my $out = $q->p({class => 'confirmed'}, sprintf(_('Thank you — you can <a href="%s">view your updated problem</a> on the site.'), $report_url)); - $out .= CrossSell::display_advert($q, $email, $name); + my $display_advert = Cobrand::allow_crosssell_advert($cobrand); + if ($display_advert) { + $out .= CrossSell::display_advert($q, $email, $name); + } return $out; } |