From 375644bc1cbda06eb6bacb7a1461328db64486bd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 20 Sep 2015 22:15:22 +0200 Subject: remove marudor_v1 backend (no longer in use) --- index.pl | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/index.pl b/index.pl index 008161c..3acd993 100644 --- a/index.pl +++ b/index.pl @@ -297,8 +297,7 @@ sub handle_request { $self->stash( title => 'db-infoscreen' ); $self->stash( version => $VERSION ); - if ( not( $template ~~ [qw[clean json marudor_v1 marudor multi single]] ) ) - { + if ( not( $template ~~ [qw[clean json marudor multi single]] ) ) { $template = 'clean'; } @@ -321,7 +320,7 @@ sub handle_request { my $errstr = $data->{errstr}; my @results = @{$results_ref}; - if ( not @results and $template ~~ [qw[json marudor_v1 marudor]] ) { + if ( not @results and $template ~~ [qw[json marudor]] ) { $self->handle_no_results_marudor( $backend, $station, $errstr, $api_version, $callback ); return; @@ -432,7 +431,7 @@ sub handle_request { . $additional_line . ( $info ? ' +++ ' : q{} ) . $info; - if ( $template ne 'marudor_v1' and $template ne 'marudor' ) { + if ( $template ne 'marudor' ) { push( @{$moreinfo}, [ 'Zusätzliche Halte', $additional_line ] @@ -447,7 +446,7 @@ sub handle_request { . $cancel_line . ( $info ? ' +++ ' : q{} ) . $info; - if ( $template ne 'marudor_v1' and $template ne 'marudor' ) { + if ( $template ne 'marudor' ) { push( @{$moreinfo}, [ 'Ohne Halt in', $cancel_line ] ); } } @@ -731,27 +730,6 @@ sub handle_request { ); } } - elsif ( $template eq 'marudor_v1' ) { - my $json = $self->render_to_string( - json => { - api_version => $api_version, - preformatted => \@departures, - version => $VERSION, - } - ); - if ($callback) { - $self->render( - data => "$callback($json);", - format => 'json' - ); - } - else { - $self->render( - data => $json, - format => 'json' - ); - } - } else { $self->render( $template, -- cgit v1.2.3