summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo
diff options
context:
space:
mode:
authorSimon Rettberg2017-05-09 13:12:27 +0200
committerSimon Rettberg2017-05-09 13:12:27 +0200
commit3adba792b55fbcaeda42f8c1588b2889ec308b39 (patch)
tree951604176c44136216553ec9fa8c9143588a8a54 /modules-available/locationinfo
parent[rebootcontrol] API call for rebuilding all modules (diff)
downloadslx-admin-3adba792b55fbcaeda42f8c1588b2889ec308b39.tar.gz
slx-admin-3adba792b55fbcaeda42f8c1588b2889ec308b39.tar.xz
slx-admin-3adba792b55fbcaeda42f8c1588b2889ec308b39.zip
[locationinfo] Fix more undefined offset access
Fixes #3133
Diffstat (limited to 'modules-available/locationinfo')
-rw-r--r--modules-available/locationinfo/page.inc.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php
index 4ad2ab0f..d43380c7 100644
--- a/modules-available/locationinfo/page.inc.php
+++ b/modules-available/locationinfo/page.inc.php
@@ -500,15 +500,16 @@ class Page_LocationInfo extends Page
$openingtimes = array();
}
if ($this->isEasyMode($openingtimes)) {
- echo Render::parse('timetable', array('id' => $id,
- 'openingtime0' => $openingtimes[0]['openingtime'],
- 'closingtime0' => $openingtimes[0]['closingtime'],
- 'openingtime1' => $openingtimes[1]['openingtime'],
- 'closingtime1' => $openingtimes[1]['closingtime'],
- 'openingtime2' => $openingtimes[2]['openingtime'],
- 'closingtime2' => $openingtimes[2]['closingtime'],
+ $data = array('id' => $id,
'easyMode' => true,
- 'expertMode' => false));
+ 'expertMode' => false
+ );
+ foreach ($openingtimes as $idx => $ot) {
+ foreach ($ot as $k => $v) {
+ $data[$k . $idx] = $v;
+ }
+ }
+ echo Render::parse('timetable', $data);
} else {
$index = 0;