Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Travel-Status-DE-HAFAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
Travel-Status-DE-HAFAS
Commits
8ab29ec6
Commit
8ab29ec6
authored
9 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
turns out delayReason holds more data than anticipated
parent
af194f0b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Travel/Status/DE/HAFAS.pm
+11
-5
11 additions, 5 deletions
lib/Travel/Status/DE/HAFAS.pm
with
11 additions
and
5 deletions
lib/Travel/Status/DE/HAFAS.pm
+
11
−
5
View file @
8ab29ec6
...
...
@@ -253,9 +253,9 @@ sub similar_stops {
if
(
$service
and
exists
$hafas_instance
{
$service
}{
stopfinder
}
)
{
my
$sf
=
Travel::Status::DE::HAFAS::
StopFinder
->
new
(
url
=>
$hafas_instance
{
$service
}{
stopfinder
},
input
=>
$self
->
{
station
},
ua
=>
$self
->
{
ua
},
url
=>
$hafas_instance
{
$service
}{
stopfinder
},
input
=>
$self
->
{
station
},
ua
=>
$self
->
{
ua
},
developer_mode
=>
$self
->
{
developer_mode
},
);
if
(
my
$err
=
$sf
->
errstr
)
{
...
...
@@ -307,10 +307,16 @@ sub results {
substr
(
$date
,
6
,
0
,
'
20
'
);
# delayReason=" " means no delay reason
if
(
$info
eq
q{ }
)
{
# TODO the first charactor of delayReason is special:
# " " -> no additional data, rest (if any) is delay reason
# else -> first word is not a delay reason but additional data,
# for instance "Zusatzfahrt/Ersatzfahrt" for a replacement train
if
(
$info
and
$info
eq
q{ }
)
{
$info
=
undef
;
}
elsif
(
substr
(
$info
,
0
,
1
)
eq
q{ }
)
{
substr
(
$info
,
0
,
1
,
q{}
);
}
$train
=~
s{#.*$}{}
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment