aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlouise <louise>2009-11-11 14:30:38 +0000
committerlouise <louise>2009-11-11 14:30:38 +0000
commit809aeebe0325b174bbe631f1688145ec75c8046d (patch)
treeb2d7d4df74a000e13c7a8cf46b7070d1d7ac715d
parent8ddc93f3571cac8da8ee9d09c98cac523ec4888c (diff)
Allow cobrand to determine display of cross sell ads
-rwxr-xr-xweb/index.cgi7
-rwxr-xr-xweb/questionnaire.cgi10
2 files changed, 12 insertions, 5 deletions
diff --git a/web/index.cgi b/web/index.cgi
index 4ad9aeda3..149557520 100755
--- a/web/index.cgi
+++ b/web/index.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: index.cgi,v 1.315 2009-11-10 14:23:51 louise Exp $
+# $Id: index.cgi,v 1.316 2009-11-11 14:33:01 louise Exp $
use strict;
use Standard;
@@ -395,7 +395,10 @@ sub submit_problem {
if $image;
dbh()->commit();
$out = $q->p(sprintf(_('You have successfully confirmed your report and you can now <a href="%s">view it on the site</a>.'), "/report/$id"));
- $out .= CrossSell::display_advert($q, $input{email}, $input{name});
+ my $display_advert = Cobrand::allow_crosssell_adverts($cobrand);
+ if ($display_advert) {
+ $out .= CrossSell::display_advert($q, $input{email}, $input{name});
+ }
} else {
$out = $q->p('There appears to have been a problem updating the details of your report.
Please <a href="/contact">let us know what went on</a> and we\'ll look into it.');
diff --git a/web/questionnaire.cgi b/web/questionnaire.cgi
index 8de11a71a..a6382c956 100755
--- a/web/questionnaire.cgi
+++ b/web/questionnaire.cgi
@@ -6,7 +6,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: questionnaire.cgi,v 1.45 2009-11-05 13:05:37 matthew Exp $
+# $Id: questionnaire.cgi,v 1.46 2009-11-11 14:30:38 louise Exp $
use strict;
use Standard;
@@ -162,8 +162,12 @@ EOF
<p style="font-size:150%">Thank you very much for filling in our questionnaire; glad to hear it's been fixed.</p>
EOF
}
- $out .= CrossSell::display_advert($q, $problem->{email}, $problem->{name},
- council => $problem->{council});
+ my $cobrand = Page::get_cobrand($q);
+ my $display_advert = Cobrand::allow_crosssell_adverts($cobrand);
+ if ($display_advert) {
+ $out .= CrossSell::display_advert($q, $problem->{email}, $problem->{name},
+ council => $problem->{council});
+ }
return $out;
}