aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/CrossSell.pm4
-rwxr-xr-xweb/alert.cgi4
2 files changed, 4 insertions, 4 deletions
diff --git a/perllib/CrossSell.pm b/perllib/CrossSell.pm
index 9f471d5f6..909d3b990 100644
--- a/perllib/CrossSell.pm
+++ b/perllib/CrossSell.pm
@@ -9,7 +9,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: CrossSell.pm,v 1.1 2007-07-09 17:40:28 matthew Exp $
+# $Id: CrossSell.pm,v 1.2 2007-09-25 13:30:21 matthew Exp $
# Config parameters site needs set to call these functions:
# OPTION_AUTH_SHARED_SECRET
@@ -32,7 +32,7 @@ sub display_hfymp_advert ($;$$) {
my $url = mySociety::Config::get('HEARFROMYOURMP_BASE_URL');
my $already_signed = get($url . '/authed?email=' . uri_escape($user_email) . "&sign=" . uri_escape($auth_signature));
# Different from PHP version; display this advert if e.g. connection problem
- return '' if $already_signed eq 'already signed';
+ return '' if $already_signed && $already_signed eq 'already signed';
# If not, display advert
$url .= '/?email=' . uri_escape($user_email) . '&sign=' . uri_escape($auth_signature);
diff --git a/web/alert.cgi b/web/alert.cgi
index ed66841df..413dd4d1b 100755
--- a/web/alert.cgi
+++ b/web/alert.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: alert.cgi,v 1.20 2007-09-25 11:55:05 matthew Exp $
+# $Id: alert.cgi,v 1.21 2007-09-25 13:30:21 matthew Exp $
use strict;
use Standard;
@@ -241,7 +241,7 @@ postcode or street name and area:
</form>
EOF
- return $out if $q->referer() =~ /fixmystreet\.com/;
+ return $out if $q->referer() && $q->referer() =~ /fixmystreet\.com/;
my $recent_photos = Page::recent_photos(10);
$out .= "<div id='alert_recent'><h2>Some photos of recent reports</h2>$recent_photos</div>" if $recent_photos;