aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Page.pm
diff options
context:
space:
mode:
authorlouise <louise>2009-09-03 13:36:47 +0000
committerlouise <louise>2009-09-03 13:36:47 +0000
commit07911d4a2ce3e657f3d8a6ac47d18a1a4fa2e437 (patch)
treed920bbd10eaf27a37489c918d42e8e243b3b0bf4 /perllib/Page.pm
parentc099781324cfb2a973a34fa5ca2e8a6011ed0ce2 (diff)
Let emails contain correct urls in the case of subdomains, change error style from id to class as can appear more than once
Diffstat (limited to 'perllib/Page.pm')
-rw-r--r--perllib/Page.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index b8dd13e27..9b0860391 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Page.pm,v 1.169 2009-09-02 09:07:26 louise Exp $
+# $Id: Page.pm,v 1.170 2009-09-03 13:36:47 louise Exp $
#
package Page;
@@ -121,7 +121,8 @@ sub microsite {
sub base_url_with_lang {
my ($q, $reverse) = @_;
- my $base = mySociety::Config::get('BASE_URL');
+ my $host = $ENV{HTTP_HOST} || '';
+ my $base = "http://" . $host;
return $base unless $q->{site} eq 'emptyhomes';
my $lang = $mySociety::Locale::lang;
if ($reverse && $lang eq 'en-gb') {
@@ -268,7 +269,7 @@ EOF
$html =~ s#<!-- RSS -->#<link rel="alternate" type="application/rss+xml" title="$params{rss}[0]" href="$params{rss}[1]">#;
}
if (mySociety::Config::get('STAGING_SITE')) {
- $html .= '<p id="error">' . _("This is a developer site; things might break at any time.") . '</p>';
+ $html .= '<p class="error">' . _("This is a developer site; things might break at any time.") . '</p>';
}
return $html;
}