aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Page.pm
diff options
context:
space:
mode:
authormatthew <matthew>2009-08-14 11:02:50 +0000
committermatthew <matthew>2009-08-14 11:02:50 +0000
commitbfa3fb4f68e00d76494dfe6f417d45d40d5b1de5 (patch)
tree428f4d9ef0e5a335ce82780a2c7b7d345c7bc296 /perllib/Page.pm
parentfe74cdd9f87b1fe779254da484ca0e1f9d713b90 (diff)
Only do lang on reportemptyhomes!
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 efb126d80..28004f6ee 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.158 2009-08-12 11:55:12 matthew Exp $
+# $Id: Page.pm,v 1.159 2009-08-14 11:02:50 matthew Exp $
#
package Page;
@@ -123,8 +123,9 @@ sub microsite {
}
sub base_url_with_lang {
- my $reverse = shift;
+ my ($q, $reverse) = @_;
my $base = mySociety::Config::get('BASE_URL');
+ return $base unless $q->{site} eq 'emptyhomes';
my $lang = $mySociety::Locale::lang;
if ($reverse && $lang eq 'en-gb') {
$base =~ s{http://}{$&cy.};
@@ -172,7 +173,7 @@ sub header ($%) {
close FP;
my %vars;
if ($q->{site} eq 'emptyhomes') {
- my $lang_url = base_url_with_lang(1);
+ my $lang_url = base_url_with_lang($q, 1);
$lang_url .= $ENV{REQUEST_URI} if $ENV{REQUEST_URI};
%vars = (
'report' => _('Report a problem'),