aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm2
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm4
3 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index cd1246134..f1508f0b1 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -523,7 +523,7 @@ sub fetch_languages : Private {
my ( $self, $c ) = @_;
my $lang_map = {};
- foreach my $lang (sort @{$c->cobrand->languages}) {
+ foreach my $lang (@{$c->cobrand->languages}) {
my ($id, $name, $code) = split(',', $lang);
$lang_map->{$id} = { name => $name, code => $code };
}
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm
index 068f393f2..033f5c017 100644
--- a/perllib/FixMyStreet/App/Controller/Report/Update.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm
@@ -351,7 +351,7 @@ sub check_for_errors : Private {
if ( $state && $state ne $c->stash->{update}->problem->state ) {
my $error = 0;
$error = 1 unless $c->user && $c->user->belongs_to_body( $c->stash->{update}->problem->bodies_str );
- $error = 1 unless grep { $state eq $_ } FixMyStreet::DB::Result::Problem->council_states();
+ $error = 1 unless grep { $state eq $_ } FixMyStreet::DB::Result::Problem->visible_states();
if ( $error ) {
$c->stash->{errors} ||= [];
push @{ $c->stash->{errors} }, _('There was a problem with your update. Please try again.');
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index fe200a8fc..93c459e26 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -169,12 +169,12 @@ sub decode {
}
sub prettify_state {
- my ($self, $c, $text) = @_;
+ my ($self, $c, $text, $single_fixed) = @_;
# New template to prevent interaction with current one
my $tt = FixMyStreet::Template->new({ INCLUDE_PATH => $self->{include_path} });
my $var;
$tt->process('report/state-list.html', { state => $text }, \$var);
- $var =~ s/ - .*//;
+ $var =~ s/ - .*// if $single_fixed;
return $var;
}