From 951581a95a95d43e59ebec8588e00c7f0f37306d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 12 Oct 2020 19:31:39 +0200 Subject: do template fallback before performing legacy check --- lib/DBInfoscreen/Controller/Stationboard.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index d4217ea..2bf2bcb 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -213,6 +213,10 @@ sub handle_request { $self->stash( title => 'DBF' ); $self->stash( version => $dbf_version ); + if ( not( $template ~~ [qw[app infoscreen json multi single text]] ) ) { + $template = 'app'; + } + if ( defined $station and $station =~ s{ [.] txt $ }{}x ) { $template = 'text'; $self->param( station => $station ); @@ -240,10 +244,6 @@ sub handle_request { $template = 'json'; } - if ( not( $template ~~ [qw[app infoscreen json multi single text]] ) ) { - $template = 'app'; - } - $self->param( mode => $template ); if ( not $station ) { -- cgit v1.2.3