diff options
author | matthew <matthew> | 2009-12-22 14:22:09 +0000 |
---|---|---|
committer | matthew <matthew> | 2009-12-22 14:22:09 +0000 |
commit | ad432c6d6e5ae88f1000dbb59e175c5b7a7f6c23 (patch) | |
tree | bc56db5dfba41bf71e0616b7ff27da7e7adb714e | |
parent | 5d88bad97ea483d6e74c333fe111910dd2594a79 (diff) |
Fallback to default vhost for cobrand if none available.
-rw-r--r-- | perllib/Cobrand.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm index 0a43cb80c..c195ee6d7 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.56 2009-12-16 13:00:34 louise Exp $ +# $Id: Cobrand.pm,v 1.57 2009-12-22 14:22:09 matthew Exp $ package Cobrand; use strict; @@ -219,11 +219,9 @@ Return the virtual host that sends email for this cobrand sub email_host { my ($cobrand) = @_; - my $email_vhost; - if ($cobrand eq '') { - $email_vhost = mySociety::Config::get('EMAIL_VHOST'); - } else { - $email_vhost = mySociety::Config::get('EMAIL_VHOST_'. uc($cobrand)); + my $email_vhost = mySociety::Config::get('EMAIL_VHOST'); + if ($cobrand) { + $email_vhost = mySociety::Config::get('EMAIL_VHOST_'. uc($cobrand), $email_vhost); } if ($email_vhost && 'http://' . $email_vhost eq mySociety::Config::get('BASE_URL')) { return 1; |