diff options
author | Jannik Schönartz | 2017-01-19 17:42:50 +0100 |
---|---|---|
committer | Jannik Schönartz | 2017-01-19 17:42:50 +0100 |
commit | 114e5e684000f630ee51b644e8abb7142d390b7c (patch) | |
tree | 95c6dba3a0f427f3f65f76e02b75375da1e3b3d0 /modules-available/locationinfo/api.inc.php | |
parent | frontend: fixed not showing free pc ount sometimes (diff) | |
download | slx-admin-114e5e684000f630ee51b644e8abb7142d390b7c.tar.gz slx-admin-114e5e684000f630ee51b644e8abb7142d390b7c.tar.xz slx-admin-114e5e684000f630ee51b644e8abb7142d390b7c.zip |
Deleted the pcsubtable. Bugs/Usability fixes.
Diffstat (limited to 'modules-available/locationinfo/api.inc.php')
-rw-r--r-- | modules-available/locationinfo/api.inc.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/modules-available/locationinfo/api.inc.php b/modules-available/locationinfo/api.inc.php index 515ac81f..60537d5b 100644 --- a/modules-available/locationinfo/api.inc.php +++ b/modules-available/locationinfo/api.inc.php @@ -136,12 +136,28 @@ function getOpeningTimesFromParent($locationID) { $parentlocationid = (int)$dbdata['parentlocationid']; } if ($parentlocationid == 0) { - echo json_encode(array()); + echo json_encode(createBasicClosingTime(), true); }else { getOpeningTimes($parentlocationid); } } +function createBasicClosingTime() { + $weekarray = array ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"); + $array = array(); + foreach ($weekarray as $d) { + $a = array(); + $arr['HourOpen'] = '00'; + $arr['MinutesOpen'] = '00'; + + $arr['HourClose'] = '23'; + $arr['MinutesClose'] = '59'; + $a[] = $arr; + $array[$d] = $a; + } + return $array; +} + function getOpeningTimes($locationID) { $error = checkIfHidden($locationID); if ($error == true) { |