From 55c8045b6cb074be5ef01393b9eabc6dc52532fd Mon Sep 17 00:00:00 2001 From: louise Date: Wed, 11 Nov 2009 13:58:15 +0000 Subject: Allow cobrands to determine whether to display cross sell ads --- perllib/Cobrand.pm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'perllib/Cobrand.pm') diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm index 917e12a1e..dd90be2ba 100644 --- a/perllib/Cobrand.pm +++ b/perllib/Cobrand.pm @@ -7,7 +7,7 @@ # Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved. # Email: louise@mysociety.org. WWW: http://www.mysociety.org # -# $Id: Cobrand.pm,v 1.35 2009-11-04 15:16:58 matthew Exp $ +# $Id: Cobrand.pm,v 1.36 2009-11-11 13:58:15 louise Exp $ package Cobrand; use strict; @@ -509,6 +509,24 @@ sub allow_photo_upload { } } +=item allow_crosssell_adverts COBRAND + +Return a boolean indicating whether the cobrand allows the display of crosssell adverts + +=cut +sub allow_crosssell_adverts { + my ($cobrand) = @_; + my $handle; + if ($cobrand){ + $handle = cobrand_handle($cobrand); + } + if ( !$cobrand || !$handle || !$handle->can('allow_crosssell_adverts')){ + return 1; + } else{ + return $handle->allow_crosssell_adverts(); + } +} + =item allow_photo_display COBRAND Return a boolean indicating whether the cobrand allows photo display -- cgit v1.2.3