aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Page.pm
diff options
context:
space:
mode:
authorlouise <louise>2009-09-03 13:54:13 +0000
committerlouise <louise>2009-09-03 13:54:13 +0000
commitda267ca95590f26aa4352a35ca6bacfaf94fbe2b (patch)
tree4b9cc8eb528eaa183b9910c1719f5b8de191e0aa /perllib/Page.pm
parent07911d4a2ce3e657f3d8a6ac47d18a1a4fa2e437 (diff)
Do not add lang to url that has lang
Diffstat (limited to 'perllib/Page.pm')
-rw-r--r--perllib/Page.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index 9b0860391..2e76488f1 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.170 2009-09-03 13:36:47 louise Exp $
+# $Id: Page.pm,v 1.171 2009-09-03 13:54:13 louise Exp $
#
package Page;
@@ -125,6 +125,7 @@ sub base_url_with_lang {
my $base = "http://" . $host;
return $base unless $q->{site} eq 'emptyhomes';
my $lang = $mySociety::Locale::lang;
+ $base =~ s{http://(cy|en)\.}{http://};
if ($reverse && $lang eq 'en-gb') {
$base =~ s{http://}{$&cy.};
} elsif ($reverse) {