diff options
author | matthew <matthew> | 2009-01-15 10:19:26 +0000 |
---|---|---|
committer | matthew <matthew> | 2009-01-15 10:19:26 +0000 |
commit | 96633ba434dd7e159532c2aaaa948460d659fb29 (patch) | |
tree | 02309b8f2e846ea04cc0656bcf2b32a1b43f010b | |
parent | fa21ab2334aec3bb937305c84db9a366c3661cd3 (diff) |
Fix some hardcodings.
-rw-r--r-- | perllib/Page.pm | 5 | ||||
-rwxr-xr-x | web/index.cgi | 5 | ||||
-rwxr-xr-x | web/rss.cgi | 8 |
3 files changed, 11 insertions, 7 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 9e6f4f2f6..5691cd3f7 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.132 2009-01-10 18:37:44 matthew Exp $ +# $Id: Page.pm,v 1.133 2009-01-15 10:19:26 matthew Exp $ # package Page; @@ -64,11 +64,12 @@ sub do_fastcgi { warn "caught fatal exception: $msg"; warn "aborting"; ent($msg); + my $contact_email = mySociety::Config::get('CONTACT_EMAIL'); print "Status: 500\nContent-Type: text/html; charset=iso-8859-1\n\n", q(<html><head><title>Sorry! Something's gone wrong.</title></head></html>), q(<body>), q(<h1>Sorry! Something's gone wrong.</h1>), - q(<p>Please try again later, or <a href="mailto:team@fixmystreet.com">email us</a> to let us know.</p>), + qq(<p>Please try again later, or <a href="mailto:$contact_email">email us</a> to let us know.</p>), q(<hr>), q(<p>The text of the error was:</p>), qq(<blockquote class="errortext">$msg</blockquote>), diff --git a/web/index.cgi b/web/index.cgi index 80ae8c4e7..d5f768440 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.238 2009-01-10 18:37:45 matthew Exp $ +# $Id: index.cgi,v 1.239 2009-01-15 10:19:28 matthew Exp $ use strict; use Standard; @@ -60,7 +60,8 @@ sub main { $q->param('phone', $row[6]); $q->param('partial', $partial); } else { - print $q->redirect(-location => 'http://www.fixmystreet.com/report/' . $id); + my $base = mySociety::Config::get('BASE_URL'); + print $q->redirect(-location => $base . '/report/' . $id); } } } diff --git a/web/rss.cgi b/web/rss.cgi index e89629a73..5d6edded2 100755 --- a/web/rss.cgi +++ b/web/rss.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: rss.cgi,v 1.26 2008-12-08 10:54:16 matthew Exp $ +# $Id: rss.cgi,v 1.27 2009-01-15 10:19:28 matthew Exp $ use strict; use Error qw(:try); @@ -42,7 +42,8 @@ sub main { } elsif ($type eq 'all_problems') { $out = mySociety::Alert::generate_rss($type, $xsl, ''); } else { - print $q->redirect('http://www.fixmystreet.com/alert'); + my $base = mySociety::Config::get('BASE_URL'); + print $q->redirect($base . '/alert'); exit; } print $q->header( -type => 'application/xml; charset=utf-8' ); @@ -77,7 +78,8 @@ sub rss_local_problems { $error = shift; }; unless ($error) { - print $q->redirect(-location => "http://www.fixmystreet.com/rss/$x/$y"); + my $base = mySociety::Config::get('BASE_URL'); + print $q->redirect(-location => "$base/rss/$x/$y"); } return ''; } else { |