diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 11f499b..9c09431 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -1960,7 +1960,13 @@ sub redirect_to_station { } } - if ( $input =~ m{ ^ [a-zA-Z]{1,5} \s+ \d+ $ }x ) { + if ( $input =~ m{ ^ [a-zA-Z]{1,5} \s+ \d+ }x ) { + if ( $input =~ s{ \s* @ \s* (?<date> [0-9.]+) $ }{}x ) { + $params->param( date => $+{date} ); + } + elsif ( $input =~ s{ \s* [(] \s* (?<date> [0-9.]+) \s* [)] $ }{}x ) { + $params->param( date => $+{date} ); + } $params = $params->to_string; $self->redirect_to("/z/${input}?${params}"); } |