aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorJon Kristensen <info@jonkri.com>2014-12-13 21:22:45 +0100
committerMatthew Somerville <matthew@mysociety.org>2015-02-16 14:55:49 +0000
commit4976fbc475a621fe642076c456eca58b74c223d5 (patch)
tree60f0a106c7a836068e666d1d8049e99eaa39db67 /perllib
parent20bf39caf4d669aa51e289704388b8e696a45810 (diff)
[FixaMinGata] Remove two unneeded cobrand methods
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/FixaMinGata.pm115
1 files changed, 0 insertions, 115 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
index 7e8942feb..4101dc5b5 100644
--- a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
+++ b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
@@ -121,121 +121,6 @@ sub filter_all_council_ids_list {
return @all_councils_ids; # Är detta rätt? //Rikard
}
-# Vad ska vi göra för svenska förhållanden här??? //Rikard
-sub council_rss_alert_options {
- my $self = shift;
- my $all_councils = shift;
- my $c = shift;
-
- my ( @options, @reported_to_options, $fylke, $kommune );
-
- foreach ( values %$all_councils ) {
- if ( $_->{type} eq 'NKO' ) {
- $kommune = $_;
- }
- else {
- $fylke = $_;
- }
- }
-
- if ( $fylke->{id} == 3 ) { # Oslo
- my $short_name = $self->short_name($fylke, $all_councils);
- ( my $id_name = $short_name ) =~ tr/+/_/;
-
- push @options,
- {
- type => 'council',
- id => sprintf( 'council:%s:%s', $fylke->{id}, $id_name ),
- rss_text =>
- sprintf( _('RSS feed of problems within %s'), $fylke->{name} ),
- text => sprintf( _('Problems within %s'), $fylke->{name} ),
- uri => $c->uri_for( '/rss/reports', $short_name ),
- };
- }
- else {
- my $short_kommune_name = $self->short_name($kommune, $all_councils);
- ( my $id_kommune_name = $short_kommune_name ) =~ tr/+/_/;
-
- my $short_fylke_name = $self->short_name($fylke, $all_councils);
- ( my $id_fylke_name = $short_fylke_name ) =~ tr/+/_/;
-
- push @options,
- {
- type => 'area',
- id => sprintf( 'area:%s:%s', $kommune->{id}, $id_kommune_name ),
- rss_text =>
- sprintf( _('RSS feed of %s'), $kommune->{name} ),
- text => $kommune->{name},
- uri => $c->uri_for( '/rss/area', $short_kommune_name ),
- },
- {
- type => 'area',
- id => sprintf( 'area:%s:%s', $fylke->{id}, $id_fylke_name ),
- rss_text =>
- sprintf( _('RSS feed of %s'), $fylke->{name} ),
- text => $fylke->{name},
- uri => $c->uri_for( '/rss/area', $short_fylke_name ),
- };
-
- push @reported_to_options,
- {
- type => 'council',
- id => sprintf( 'council:%s:%s', $kommune->{id}, $id_kommune_name ),
- rss_text =>
- sprintf( _('RSS feed of %s'), $kommune->{name} ),
- text => $kommune->{name},
- uri => $c->uri_for( '/rss/reports', $short_kommune_name ),
- },
- {
- type => 'council',
- id => sprintf( 'council:%s:%s', $fylke->{id}, $id_fylke_name ),
- rss_text =>
- sprintf( _('RSS feed of %s'), $fylke->{name} ),
- text => $fylke->{name},
- uri => $c->uri_for( '/rss/reports/', $short_fylke_name ),
- };
- }
-
- return (
- \@options, @reported_to_options
- ? \@reported_to_options
- : undef
- );
-
-}
-
-# Vad ska vi göra för svenska förhållanden här??? //Rikard
-sub reports_council_check {
- my ( $self, $c, $council ) = @_;
-
- if ($council eq 'Oslo') {
-
- # There are two Oslos (kommune and fylke), we only want one of them.
- $c->stash->{council} = mySociety::MaPit::call('area', 3);
- return 1;
-
- } elsif ($council =~ /,/) {
-
- # Some kommunes have the same name, use the fylke name to work out which.
- my ($kommune, $fylke) = split /\s*,\s*/, $council;
- my $area_types = $c->cobrand->area_types;
- my $areas_k = mySociety::MaPit::call('areas', $kommune, type => $area_types);
- my $areas_f = mySociety::MaPit::call('areas', $fylke, type => $area_types);
- if (keys %$areas_f == 1) {
- ($fylke) = values %$areas_f;
- foreach (values %$areas_k) {
- if ($_->{name} eq $kommune && $_->{parent_area} == $fylke->{id}) {
- $c->stash->{council} = $_;
- return 1;
- }
- }
- }
- # If we're here, we've been given a bad name.
- $c->detach( 'redirect_index' );
-
- }
-}
-
# The pin is green is it's fixed, yellow if it's closed (but not fixed), and
# red otherwise.
sub pin_colour {