diff options
author | francis <francis> | 2007-12-11 12:07:10 +0000 |
---|---|---|
committer | francis <francis> | 2007-12-11 12:07:10 +0000 |
commit | 1322d2acbfe99c79cce9e06eee431f4b5bc83c61 (patch) | |
tree | 224de21e8e0e6619141fd77381b42bcafe142935 | |
parent | cf7e6456c31ed7d23f695d5e1463969f52d5980e (diff) |
Use explicit URL in config for admin base URL.
-rw-r--r-- | app/views/layouts/admin.rhtml | 8 | ||||
-rw-r--r-- | config/general-example | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.rhtml index 9f45eba93..b856632d5 100644 --- a/app/views/layouts/admin.rhtml +++ b/app/views/layouts/admin.rhtml @@ -11,12 +11,8 @@ <body> <p><b>FOIFA admin interface:</b> -<% # This is evil. We have to use ../../blah relative URLs so it still works - # when proxied over HTTPS from secure.mysociety.org - which it has to be as - # it is our admin interface and is protected by valuable passwords. - url_prefix = ('../' * (request.request_uri.split('/').size - 3)) -%> -<%= link_to 'Public bodies', url_prefix + 'body/list' %> +<% admin_url_prefix = MySociety::Config.get("ADMIN_BASE_URL", "/admin/") %> +<%= link_to 'Public bodies', admin_url_prefix + 'body/list' %> </p> <p style="color: green"><%= flash[:notice] %></p> diff --git a/config/general-example b/config/general-example index 2de8f4d5b..c812f3384 100644 --- a/config/general-example +++ b/config/general-example @@ -19,7 +19,7 @@ * Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. * Email: francis@mysociety.org; WWW: http://www.mysociety.org * - * $Id: general-example,v 1.7 2007-11-27 10:36:51 francis Exp $ + * $Id: general-example,v 1.8 2007-12-11 12:07:10 francis Exp $ * */ @@ -37,6 +37,7 @@ define('OPTION_INCOMING_EMAIL_SECRET', 'xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx' // Administration define('OPTION_CONTACT_EMAIL', 'admin@localhost'); +define('OPTION_ADMIN_BASE_URL', '/admin/'); ?> |