aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/View/Web.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-08-31 16:15:46 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-08-31 16:15:46 +0100
commitcec5c77a4207b341947affed8e6e8e57ec29965d (patch)
tree246900550b394f956a8ac4bd76ffbe943cc8fb1e /perllib/FixMyStreet/App/View/Web.pm
parentc590981f0c198fa0491801a312a65eed054a0778 (diff)
parent51a5bcc74982aefea4f7b364e2f4bc49596bd9bf (diff)
Merge branch 'move-report-states-to-database'
Diffstat (limited to 'perllib/FixMyStreet/App/View/Web.pm')
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index 93c459e26..93aa0e2fb 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -170,12 +170,8 @@ sub decode {
sub prettify_state {
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/ - .*// if $single_fixed;
- return $var;
+
+ return FixMyStreet::DB->resultset("State")->display($text, $single_fixed);
}
1;