aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm12
-rw-r--r--perllib/FixMyStreet/Cobrand/UKCouncils.pm5
2 files changed, 17 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 4c5d29ee5..e54d85aa7 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -237,6 +237,18 @@ sub base_url_for_report {
return $self->base_url_with_lang;
}
+=item relative_url_for_report
+
+Returns the relative base url for a report (might be different in a two-tier
+county, but normally blank). Report may be an object, or a hashref.
+
+=cut
+
+sub relative_url_for_report {
+ my ( $self, $report ) = @_;
+ return "";
+}
+
=item base_host
Return the base host for the cobranded version of the site
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
index ab3d8f91b..1beafef73 100644
--- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm
+++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
@@ -204,6 +204,11 @@ sub base_url_for_report {
}
}
+sub relative_url_for_report {
+ my ( $self, $report ) = @_;
+ return $self->owns_problem($report) ? "" : FixMyStreet->config('BASE_URL');
+}
+
sub admin_allow_user {
my ( $self, $user ) = @_;
return 1 if $user->is_superuser;