diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2013-12-11 17:47:02 +0000 |
---|---|---|
committer | Hakim Cassimally <hakim@mysociety.org> | 2013-12-11 17:47:02 +0000 |
commit | cbfe33690c64f6a301e77971abb9b762318bb9be (patch) | |
tree | ca48d4b2258355727cbb49e102120cf365e2d76f | |
parent | 7628dc67ad06a96c2ee18accc8c8b4f4109b1cae (diff) |
Rationalise trailing slashes from admin_base_url
Remove from admin_base_url (which wraps config vars like
{ADMIN_,}BASE_URL) and add to places in code which aren't
expecting it.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Contact.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FiksGataMi.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyStreet.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Problem.pm | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm index 3fcb449d2..7ba18ed2d 100644 --- a/perllib/FixMyStreet/App/Controller/Contact.pm +++ b/perllib/FixMyStreet/App/Controller/Contact.pm @@ -149,7 +149,7 @@ sub prepare_params_for_email : Private { my $problem_url = $base_url . '/report/' . $c->stash->{update}->problem_id . '#update_' . $c->stash->{update}->id; - my $admin_url = " - $admin_url" . 'update_edit/' . $c->stash->{update}->id + my $admin_url = " - $admin_url" . '/update_edit/' . $c->stash->{update}->id if $admin_url; $c->stash->{message} .= sprintf( " \n\n[ Complaint about update %d on report %d - %s%s ]", @@ -161,7 +161,7 @@ sub prepare_params_for_email : Private { elsif ( $c->stash->{problem} ) { my $problem_url = $base_url . '/report/' . $c->stash->{problem}->id; - $admin_url = " - $admin_url" . 'report_edit/' . $c->stash->{problem}->id + $admin_url = " - $admin_url" . '/report_edit/' . $c->stash->{problem}->id if $admin_url; $c->stash->{message} .= sprintf( " \n\n[ Complaint about report %d - %s%s ]", diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm index 5e90db038..461018639 100644 --- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm +++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm @@ -38,7 +38,7 @@ sub area_types { } sub admin_base_url { - return 'http://www.fiksgatami.no/admin/'; + return 'http://www.fiksgatami.no/admin'; } # If lat/lon are present in the URL, OpenLayers will use that to centre the map. diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index aa2be4a0f..c3a1f9d9d 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -9,7 +9,7 @@ sub restriction { } sub admin_base_url { - return 'https://secure.mysociety.org/admin/bci/'; + return 'https://secure.mysociety.org/admin/bci'; } sub title_list { diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm index b00daab40..603f425f7 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm @@ -278,7 +278,7 @@ sub send_reports { $h{query} = $row->postcode; $h{url} = $email_base_url . $row->url; - $h{admin_url} = $cobrand->admin_base_url . 'report_edit/' . $row->id; + $h{admin_url} = $cobrand->admin_base_url . '/report_edit/' . $row->id; $h{phone_line} = $h{phone} ? _('Phone:') . " $h{phone}\n\n" : ''; if ($row->photo) { $h{has_photo} = _("This web page also contains a photo of the problem, provided by the user.") . "\n\n"; |