aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-questionnaires
diff options
context:
space:
mode:
Diffstat (limited to 'bin/send-questionnaires')
-rwxr-xr-xbin/send-questionnaires6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/send-questionnaires b/bin/send-questionnaires
index bb096fa22..37d160fef 100755
--- a/bin/send-questionnaires
+++ b/bin/send-questionnaires
@@ -6,7 +6,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: send-questionnaires,v 1.20 2009-11-23 17:25:43 louise Exp $
+# $Id: send-questionnaires,v 1.21 2010-01-06 14:44:45 louise Exp $
use strict;
require 5.8.0;
@@ -63,6 +63,10 @@ foreach my $row (@$unsent) {
my $cobrand = $row->{cobrand};
my $lang = $row->{lang};
Cobrand::set_lang_and_domain($cobrand, $lang);
+ # Cobranded and non-cobranded messages can share a database. In this case, the conf file
+ # should specify a vhost to send the reports for each cobrand, so that they don't get sent
+ # more than once if there are multiple vhosts running off the same database. The email_host
+ # call checks if this is the host that sends mail for this cobrand.
next unless (Cobrand::email_host($cobrand));
my ($councils, $missing) = $row->{council} =~ /^([\d,]+)(?:\|([\d,]+))?/;
my @councils = split /,/, $councils;